/* Modern Light Design System variables v14 */
:root {
    --bg-color: #ffffff;
    --surface-color: #ffffff;
    --surface-hover: #F4F6F8;
    --primary-color: #434FDA;
    /* RentalPortal Blue */
    --primary-hover: #333cb5;
    --text-primary: #212B36;
    /* Dark Navy/Gray */
    --text-secondary: #637381;
    /* Medium Gray */
    --border-color: #DFE3E8;
    /* Light Border */
    --gradient-1: linear-gradient(135deg, #434FDA 0%, #7d85f5 100%);
    --font-main: 'Public Sans', sans-serif;
    --header-height: 70px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 8px 16px rgba(145, 158, 171, 0.08);
    /* Soft shadow for light mode */
    --shadow-hover: 0 16px 32px rgba(145, 158, 171, 0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header Styles */
.site-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo .badge {
    font-size: 0.75rem;
    background: rgba(67, 79, 218, 0.1);
    /* Light blue bg */
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
}

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

.nav-links {
    list-style: none;
    list-style: none;
    gap: 32px;
    display: none;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active {
    display: inline-flex;
    align-items: center;
}

.nav-links a.active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin-right: 6px;
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 8px 16px rgba(67, 79, 218, 0.24);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(67, 79, 218, 0.32);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    /* Larger touch target */
    z-index: 1001;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Nav Active State */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: #ffffff;
    padding: 24px;
    gap: 24px;
    z-index: 999;
    animation: slideDown 0.3s ease-out forwards;
    overflow-y: auto;
}

.nav-links.active .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 16px;
    display: none;
    /* JS can toggle this or CSS hover won't work well on touch */
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 8px;
    background: var(--surface-hover);
    border-radius: 8px;
}

.nav-links.active .dropdown:hover .dropdown-menu,
.nav-links.active .dropdown.active .dropdown-menu {
    /* Fallback for click */
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Content */
/* Main Content */
main {
    padding-top: 0;
    margin-top: 0;
    min-height: 80vh;
    padding-bottom: 60px;
}

/* Blog Hero - Robust spacing */
.blog-hero {
    text-align: center;
    padding-top: 140px;
    padding-bottom: 40px;
    padding-left: 20px;
    padding-right: 20px;
    margin-bottom: 60px;
    animation: fadeIn 0.8s ease-out;
    background: transparent;
    display: block;
    width: 100%;
}



.blog-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.1;
}



.blog-hero p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    list-style: none;
    border: 1px solid var(--border-color);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-menu li a:hover {
    background: var(--surface-hover);
    color: var(--primary-color);
}


/* Filters */
.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}



.filter-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);

    padding: 12px 24px;
    /* Larger tap targets */
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    /* Slightly clearer text */
    flex-shrink: 0;
    /* Don't shrink in carousel */
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn svg {
    color: inherit;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #ffffff;
}

.filter-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(67, 79, 218, 0.3);
}

.filter-btn.active:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

/* Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}



.card {
    background: var(--surface-color);
    border: 1px solid transparent;
    /* No border, just shadow for clean look */
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    width: 100%;
    height: 220px;
    background: #f0f0f0;
    object-fit: cover;
}

.card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 12px;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-primary);
    font-weight: 700;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    margin-top: auto;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.read-more::after {
    content: '→';
    transition: transform 0.2s;
}

.card:hover .read-more::after {
    transform: translateX(4px);
}

/* Article Viewer */


.article-viewer {
    animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    padding-top: 120px;
    /* Clears fixed header */
    padding-bottom: 60px;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    /* Extra bold */
    cursor: pointer;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    transition: var(--transition);
}

.back-btn:hover {
    color: var(--primary-color);
    transform: translateX(-4px);
}

.article-detail h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
    color: var(--text-primary);
}

.article-meta {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}



.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.author-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.article-date-read {
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 800px;
}

.article-body p {
    margin-bottom: 24px;
    color: #454f5b;
    /* Slightly softer than pure black for reading */
}

.article-body h1 {
    display: none;
}

.article-body h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.article-body h3 {
    margin-top: 32px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.article-body ul,
.article-body ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 12px;
    color: #454f5b;
}

.article-body strong {
    font-weight: 600;
    color: var(--text-primary);
}

.article-featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 40px;
}

.article-category-badge {
    font-size: 1rem;
    display: inline-block;
    margin-bottom: 16px;
}

.cta-container {
    margin-bottom: 24px;
}

.article-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 800;
    /* Extra bold */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-back-link:hover {
    color: var(--primary-color);
    transform: translateX(-4px);
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: #ffffff;
    padding: 60px 0 30px;
    margin-top: 60px;
    font-size: 0.95rem;
    /* Base font size for footer */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand {
    max-width: 320px;
    text-align: left;
}

.footer-logo {
    height: 32px;
    margin-bottom: 16px;
    display: block;
}

.footer-brand p {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 400;
}

.footer-links-group {
    display: flex;
    gap: 100px;
    flex-wrap: wrap;
    text-align: left;
    margin-right: 40px;
}

.footer-column h3 {
    color: #ffffff;
    font-size: 1.05rem;
    margin-bottom: 24px;
    font-weight: 500;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 16px;
}

.footer-column ul a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    font-weight: 400;
}

.footer-column ul a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Optimizations */
/* Mobile Optimizations - CONSOLIDATED BLOCK */
@media screen and (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    html {
        -webkit-text-size-adjust: 100%;
    }

    .container {
        padding: 0 16px;
    }

    /* Hero Section */
    .blog-hero {
        padding-top: 100px;
        padding-bottom: 32px;
        text-align: left;
    }

    .blog-hero h1 {
        font-size: 2.75rem;
        /* Unified size */
        line-height: 1.1;
        margin-bottom: 20px;
    }

    .blog-hero p {
        font-size: 1.25rem;
        line-height: 1.5;
    }

    /* Filters Carousel */
    .category-filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 12px;
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
        -ms-overflow-style: none;
        /* Hide scrollbar IE/Edge */
        gap: 12px;
    }

    .category-filters::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar WebKit */
    }

    .filter-btn {
        padding: 12px 24px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    /* Cards - Forced Single Column Grid */
    .blog-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 24px;
    }

    .card {
        width: 100% !important;
        margin: 0 !important;
    }

    .card h3 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .card p {
        font-size: 1.15rem;
        line-height: 1.6;
    }

    .card-content {
        padding: 24px;
    }

    /* Article Viewer (Reading Experience) */
    .article-viewer {
        padding-top: 100px;
    }

    .article-featured-image {
        height: 250px;
        margin-bottom: 32px;
    }

    /* Article Meta - from scattered block */
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-detail h1 {
        font-size: 2rem;
        /* Using the smaller one from scattered or 2.5rem from main? User wanted consistency. 2rem seems better for mobile title. */
        line-height: 1.2;
    }

    .article-date-read {
        text-align: left;
        font-size: 0.9rem;
    }

    .article-body {
        font-size: 1.25rem;
        line-height: 1.8;
    }

    .article-body p,
    .article-body li {
        margin-bottom: 24px;
    }

    .article-body h2 {
        font-size: 2rem;
        margin-top: 48px;
    }

    /* Header adjustments */
    .header-actions {
        display: none !important;
    }

    .logo a {
        font-size: 1.4rem;
    }

    .logo img {
        height: 32px !important;
    }

    .mobile-menu-btn {
        display: flex;
        /* Ensure it is visible */
        padding: 12px;
    }

    /* Mobile Footer adjustments */
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links-group {
        flex-direction: column;
        gap: 40px;
    }
}

/* Utility - Forced Override */
.hidden {
    display: none !important;
}