/* =========================================
   CSS Variables & Settings
   ========================================= */
:root {
    --color-bg: #FFFFFF;
    --color-bg-alt: #FCFCFC;
    --color-text-main: #1A1A1A;
    --color-text-muted: #8E8E93;
    --color-white: #FFFFFF;
    --color-border: #E5E5EA;
    --font-main: 'Inter', sans-serif;
    --container-max-width: 1440px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--color-text-main);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #333333;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.btn-outline:hover {
    border-color: var(--color-text-main);
}

.btn-block {
    width: 100%;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-main);
    cursor: pointer;
    padding: 0;
}

.btn-link svg {
    transition: transform 0.3s ease;
}

.btn-link:hover svg {
    transform: translateX(4px);
}

/* =========================================
   Header
   ========================================= */
.site-header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo img {
    height: 80px;
}

.main-nav {
    display: flex;
    gap: 32px;
}

.main-nav a {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.main-nav a:hover,
.main-nav a[data-cms-menu="blog"] {
    color: var(--color-text-main);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-phone {
    font-weight: 500;
    font-size: 15px;
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
    padding: 80px 0 64px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-tag {
    font-size: 12px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    display: block;
}

.hero-title {
    font-size: 52px;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--color-text-muted);
    margin-bottom: 48px;
    max-width: 90%;
}

.hero-visual {
    width: 100%;
    height: 100%;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    aspect-ratio: 1 / 1;
    background-color: var(--color-bg-alt);
}

/* =========================================
   Filters Section
   ========================================= */
.filters-section {
    margin-bottom: 64px;
}

.filters-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 8px;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.filters-list::-webkit-scrollbar {
    display: none;
}

.filter-item {
    white-space: nowrap;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 15px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 100px;
}

.filter-item sup {
    font-size: 10px;
    margin-left: 4px;
}

.filter-item:hover {
    color: var(--color-text-main);
}

.filter-item.active {
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    background-color: var(--color-bg-alt);
}

/* =========================================
   Articles Grid
   ========================================= */
.articles-section {
    padding-bottom: 120px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.article-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    cursor: pointer;
    background-color: var(--color-bg-alt);
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: contrast(1.1);
}

.article-card:hover .card-bg {
    transform: scale(1.03);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 32px 24px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

.card-title {
    color: var(--color-white);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: auto; /* Pushes title to top of available space inside flex if needed, or keeps it bottom */
    margin-bottom: 24px;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.card-meta {
    color: #E5E5EA;
    font-size: 13px;
}

.card-arrow {
    transition: transform 0.3s ease;
}

.article-card:hover .card-arrow {
    transform: translateX(4px);
}

/* =========================================
   Inner Page Layout (Article)
   ========================================= */
.page-wrapper {
    padding: 80px 0 120px;
}

/* Parametrization outside content */
.article-layout {
    display: flex;
    justify-content: center;
}

.article-content-zone {
    width: 100%;
    max-width: 800px;
}

.article-header {
    margin-bottom: 48px;
}

.article-h1 {
    font-size: 48px;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.article-cover {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 48px;
    background-color: var(--color-bg-alt);
}

.article-text p {
    font-size: 18px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.article-text p.lead {
    font-size: 22px;
    color: var(--color-text-main);
    font-weight: 400;
}

.article-text h2 {
    font-size: 28px;
    font-weight: 500;
    margin: 48px 0 24px;
    color: var(--color-text-main);
}

.article-text ul, .article-text ol {
    margin-bottom: 32px;
    padding-left: 24px;
    color: var(--color-text-muted);
    font-size: 18px;
    line-height: 1.6;
}

.article-text li {
    margin-bottom: 12px;
}

.article-text strong {
    color: var(--color-text-main);
    font-weight: 500;
}

.article-text blockquote {
    border-left: 2px solid var(--color-text-main);
    padding-left: 24px;
    margin: 40px 0;
    font-size: 20px;
    font-style: italic;
    color: var(--color-text-main);
}

.article-cta {
    margin-top: 64px;
    padding: 40px;
    background-color: var(--color-bg-alt);
    border-radius: 12px;
    text-align: center;
}

.article-cta h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

.article-cta p {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background-color: var(--color-bg-alt);
    padding: 80px 0;
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    height: 24px;
    margin-bottom: 24px;
    filter: grayscale(100%);
    opacity: 0.8;
}

.footer-desc {
    color: var(--color-text-muted);
    font-size: 14px;
    max-width: 300px;
    margin-bottom: 40px;
}

.copyright {
    font-size: 12px;
    color: var(--color-text-muted);
}

.footer-title {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-nav a {
    font-size: 14px;
    color: var(--color-text-main);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 14px;
    color: var(--color-text-main);
}

/* =========================================
   Modal Form
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-window {
    background: var(--color-bg);
    width: 100%;
    max-width: 480px;
    padding: 48px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    border: 1px solid var(--color-border);
}

.modal-overlay.active .modal-window {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.modal-title {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 12px;
}

.modal-subtitle {
    font-size: 15px;
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: var(--color-text-main);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .hero-title {
        font-size: 40px;
    }

    .hero-img {
        aspect-ratio: 16/9;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .main-nav {
        display: none; /* In real build, use a hamburger menu */
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .article-h1 {
        font-size: 32px;
    }
    
    .modal-window {
        padding: 32px 24px;
    }
}
/* --- Smart Hub Styles (Avant-Garde/Minimalism) --- */
.smart-hub {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.hub-controls {
    margin-bottom: 2rem;
}

.hub-search {
    position: relative;
    max-width: 400px;
}

.hub-search input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.hub-search input:focus {
    outline: none;
    border-color: #333;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hub-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.hub-card {
    background: transparent;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 400px;
}

.hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.hub-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.hub-card__image-wrapper {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.hub-card__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hub-card:hover .hub-card__image-wrapper img {
    transform: scale(1.05);
}

/* Pattern Thumbnails */
.hub-card__image-wrapper.pattern-0 {
    background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
}

.hub-card__image-wrapper.pattern-1 {
    background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
}

.hub-card__image-wrapper.pattern-2 {
    background: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
}

.hub-card__image-wrapper.pattern-3 {
    background: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%);
}

.hub-card__image-wrapper.pattern-4 {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
}

.hub-card__image-wrapper.pattern-5 {
    background: linear-gradient(to right, #43e97b 0%, #38f9d7 100%);
}

.hub-card__image-wrapper.pattern-6 {
    background: linear-gradient(to top, #30cfd0 0%, #330867 100%);
}

.hub-card__image-wrapper.pattern-7 {
    background: linear-gradient(to right, #fa709a 0%, #fee140 100%);
}

.hub-card__image-wrapper.pattern-8 {
    background: linear-gradient(to top, #5ee7df 0%, #b490ca 100%);
}

.hub-card__image-wrapper.pattern-9 {
    background: linear-gradient(to right, #f78ca0 0%, #f9748f 19%, #fd868c 60%, #fe9a8b 100%);
}

.hub-card__content {
    padding: 1.5rem;
}

.hub-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: inherit;
    line-height: 1.4;
}

.hub-card__excerpt {
    font-size: 0.9rem;
    color: inherit;
    opacity: 0.8;
    line-height: 1.6;
}

.hub-footer {
    margin-top: 3rem;
    text-align: center;
}

/* Related Posts */
.related-posts {
    margin-top: 4rem;
    margin-bottom: 6rem;
    padding-top: 2rem;
    border-top: 1px solid #eaeaea;
}

.related-posts__heading {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.related-post-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.related-post-card:hover {
    background: rgba(128, 128, 128, 0.05);
}

.related-post-card__image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}

.related-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-card__title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* Utilities */
.btn-clean {
    background: none;
    border: 1px solid #333;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-clean:hover {
    background: #333;
    color: #fff;
}