/* Prop Mission - Modern Minimalistic Design System */

:root {
    /* Brand Colors */
    --brand-primary: #2275ba;
    --brand-dark: #304a6f;
    --brand-light: #c0cfee;
    
    /* UI Palette (Light Mode) */
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --text-primary: #000000;
    --text-secondary: #4b5563;
    --border-subtle: #e5e7eb;
    
    /* Tokens */
    --container-width: 1200px;
    --base-font-size: 16px;
    --grid-gap: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
    font-size: var(--base-font-size);
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-top: 80px; /* Offset for fixed header */
}

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

/* Header Styles (Premium Refinement) */
header {
    background: rgba(255, 255, 255, 0.7); /* Persistent glass white */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.8rem 0; /* Reduced initial padding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0,0,0,0.03);
}

header.scrolled {
    padding: 0.4rem 0; /* Minimal scrolled padding */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

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

.logo img {
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 48px; /* Slightly smaller logo */
}

header.scrolled .logo img {
    height: 38px !important;
}

/* Enhanced Navigation */
.nav-container {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--brand-primary);
}

/* Sliding Underline Animation */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-primary);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--brand-dark);
}

/* Burger Menu Toggle */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.burger-menu .bar {
    width: 100%;
    height: 2px;
    background-color: var(--brand-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Burger Animation to X */
.burger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-menu.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.burger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation Styles */
@media screen and (max-width: 1024px) {
    .burger-menu {
        display: flex;
    }

    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        padding: 4rem 2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0,0,0,0.05);
        gap: 2rem;
    }

    .nav-container.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.25rem;
        width: 100%;
        text-align: center;
    }

    .profile-link {
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* Buttons */
.btn-primary {
    background-color: var(--brand-primary);
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    border-radius: 0.4rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background-color: var(--brand-dark);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Premium Glassmorphism Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04);
}

/* Background Decorations */
.bg-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.decor-circle {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.15;
    animation: float 20s infinite alternate ease-in-out;
}

.c1 { width: 500px; height: 500px; background: var(--brand-primary); top: -10%; right: -5%; }
.c2 { width: 400px; height: 400px; background: var(--brand-light); bottom: 10%; left: -5%; animation-delay: -5s; }

@keyframes float {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(50px, 100px) rotate(15deg); }
}

/* Dynamic Hero Section */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-top: 0;
    padding: 0;
    color: #ffffff;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Square Yards Style Hero */
.hero {
    position: relative;
    height: 90vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    overflow: hidden;
    margin-top: 0;
    padding: 0;
    color: #ffffff;
    background-image: url('/assets/hero/s1.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: 0;
    transition: opacity 2.5s ease-in-out;
    transform: scale(1.1); /* Initial state for Ken Burns */
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
    animation: kenBurns 20s linear forwards;
}

.hero-slide.last-active {
    opacity: 1;
    z-index: 0;
}

@keyframes kenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

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

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.6);
    max-width: 800px;
}

.hero .sub-tagline {
    font-size: 1.25rem;
    margin-bottom: 3.5rem;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero-highlight {
    color: #00f2ff; /* Vibrant Neon Blue */
    font-weight: 800;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.8), 
                 0 0 20px rgba(0, 242, 255, 0.4);
    transition: opacity 0.5s ease-in-out;
    display: inline-block;
}

.hero .sub-tagline span {
    color: #00f2ff; /* Sync with Neon Blue */
    font-weight: 700;
}

/* Premium Multi-tier Search */
.hero-search-container {
    max-width: 720px;
    position: relative;
    margin-top: 2rem;
}

.search-tabs {
    display: flex;
    gap: 0.6rem;
    margin-bottom: -1px;
    z-index: 10;
    position: relative;
    align-items: flex-end; /* Align to bottom for roof height */
}

.search-tab {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    color: white;
    padding: 0.6rem 1.4rem;
    border-radius: 0.4rem 0.4rem 0 0;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.search-tab.active {
    background: #00d2ff;
    color: #000;
    border-color: #00d2ff;
    transform: translateY(-2px);
    box-shadow: 0 -5px 15px rgba(0, 210, 255, 0.3);
}

/* Home Roof Peak for Active Tab */
.search-tab.active::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 12px;
    background: #00d2ff;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.search-main {
    background: rgba(255, 255, 255, 1);
    padding: 0.4rem; /* More compact */
    border-radius: 0 0.8rem 0.8rem 0.8rem;
    display: flex;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    margin-bottom: 1.25rem;
}

.search-field-group {
    display: flex;
    flex: 1;
    align-items: center;
}

.city-select {
    padding: 0 1.25rem;
    border-right: 1px solid #eee;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-input {
    flex: 1;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.location-input input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #333;
}

.btn-search {
    background: #00d2ff; /* Electric Blue */
    color: #000; /* Dark text for contrast on bright blue */
    border: none;
    padding: 0.8rem 2.5rem; /* Compact */
    border-radius: 0.6rem;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-search:hover {
    transform: scale(1.02);
    background: var(--brand-dark);
}

.search-filters {
    display: flex;
    gap: 1rem;
}

.filter-btn {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 0.6rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

@media screen and (max-width: 767px) {
    .search-main {
        flex-direction: column;
        border-radius: 0.8rem;
    }
    .city-select {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 1rem;
    }
    .location-input {
        padding: 1.25rem 1rem;
    }
    .btn-search {
        width: 100%;
        padding: 1.25rem;
    }
    .search-filters {
        flex-wrap: wrap;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Info Grid Section */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 6rem 0;
}

.card {
    padding: 3rem 2.5rem;
    border-radius: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.6);
}

.card:hover {
    transform: translateY(-12px);
    border-color: var(--brand-primary);
    box-shadow: 0 20px 40px rgba(34, 117, 186, 0.08);
    background: #ffffff;
}

.card .icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media screen and (max-width: 767px) {
    .hero {
        height: auto;
        padding: 8rem 0 6rem;
    }
    
    .hero h1 {
        margin-bottom: 3rem;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 2rem;
        padding: 1rem;
        gap: 1.25rem;
        margin-top: 2rem;
    }
    
    .search-input-group {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding: 0.75rem 0.5rem;
    }
    
    .hero-search button {
        width: 100%;
        padding: 1.5rem;
    }
}

/* Responsiveness */
@media screen and (min-width: 768px) {
    :root { --base-font-size: 17px; }
}

@media screen and (min-width: 1440px) {
    :root { --base-font-size: 18px; --container-width: 1400px; }
}

@media screen and (min-width: 2560px) { /* TV / 4K */
    :root { --base-font-size: 22px; --container-width: 2000px; }
    section { padding: 8rem 0; }
}

.nav-link.active {
    color: var(--brand-primary);
}

.profile-link {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    transition: color 0.2s;
    margin-left: 2rem;
}

.profile-link:hover {
    color: var(--brand-primary);
}

/* Main Footer Styling (Premium Overlay Version) */
.main-footer {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 2rem 0 0;
    color: #ffffff;
    overflow: hidden;
    border-top: 4px solid #00d2ff; /* Electric Blue Accent */
    box-shadow: 0 -10px 40px rgba(0, 210, 255, 0.1);
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, #0f172a 100%); /* Executive Deep Navy */
    z-index: 0;
}

.footer-decor {
    display: none; /* Removed colorful blobs for professional look */
}

.main-footer > * {
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    padding-bottom: 2rem;
}

.footer-col h4 {
    color: #ffffff; /* Unified Professional White */
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 3px;
    background: #00d2ff; /* Unified Electric Blue Accent */
    border-radius: 2px;
}

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

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.footer-col ul li a:hover {
    color: #00d2ff;
    padding-left: 8px;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.brand-col .footer-logo {
    height: 45px;
    margin-bottom: 1.25rem;
    filter: brightness(0) invert(1); /* Make logo white for the dark footer */
}

.brand-tagline {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.social-links {
    display: flex;
    gap: 1.25rem;
}

.social-links a.facebook { background: rgba(24, 119, 242, 0.2); border-color: rgba(24, 119, 242, 0.3); color: #1877F2; }
.social-links a.instagram { background: rgba(225, 48, 108, 0.2); border-color: rgba(225, 48, 108, 0.3); color: #E1306C; }
.social-links a.x-social { background: rgba(0, 0, 0, 0.4); border-color: rgba(255, 255, 255, 0.2); color: #fff; }

.social-links a:hover.facebook { background: #1877F2; color: #fff; }
.social-links a:hover.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; border-color: transparent; }
.social-links a:hover.x-social { background: #000; color: #fff; border-color: #333; }
.social-links a:hover.linkedin { background: #0077B5; color: #fff; }
.social-links a:hover.youtube { background: #FF0000; color: #fff; }

.social-links a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.office-address {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
}

.office-phone a,
.office-email a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.2s;
}

.office-phone a:hover,
.office-email a:hover {
    opacity: 0.7;
}

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

.copyright-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
}

@media screen and (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media screen and (max-width: 640px) {
    .main-footer {
        padding: 2.5rem 0 0;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr; /* Force 2 columns as requested */
        gap: 2rem 1rem;
        padding-bottom: 2rem;
        text-align: left; /* Align left for columns */
    }
    
    .footer-col h4 {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .footer-col h4::after {
        left: 0;
        transform: none;
        width: 25px;
    }
    
    .brand-tagline, 
    .office-address, 
    .footer-col ul li a,
    .office-email {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .brand-col .footer-logo {
        height: 35px;
        margin-bottom: 1rem;
    }

    .social-links {
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .social-links a {
        width: 32px;
        height: 32px;
    }

    .footer-bottom {
        padding: 1rem 0;
    }

    .copyright-text {
        font-size: 0.75rem;
    }
}

/* Builder Marquee Section (Elite Industry Standard) */
.builders-section {
    padding: 4rem 0;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    overflow: hidden;
    position: relative;
    z-index: 5;
}

.builders-section h4 {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #94a3b8;
    margin-bottom: 3.5rem;
}

.builders-marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
    display: flex;
    padding: 1.5rem 0;
    animation: marquee-scroll 35s linear infinite;
    width: max-content;
}

.builders-section:hover .marquee-track {
    animation-play-state: paused;
}

.builder-item {
    flex-shrink: 0;
    width: 160px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 3.5rem; /* Explicit margin for seamless -50% jump */
    filter: grayscale(100%);
    opacity: 0.55;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.builder-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.builder-item:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.15);
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (max-width: 1024px) {
    .builder-item { width: 140px; margin-right: 2.5rem; }
}

@media (max-width: 768px) {
    .marquee-track { animation-duration: 25s; }
    .builder-item { width: 110px; margin-right: 2rem; }
    .builders-section h4 { font-size: 0.65rem; }
}

/* Regional News Hub (Real-Time Intelligence) */
.news-section {
    padding: 6rem 0;
    background: #f8fafc;
    position: relative;
    border-top: 1px solid #e2e8f0;
}

.section-header.center {
    text-align: center;
    margin-bottom: 4rem;
}

.news-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.news-tab {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.news-tab:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-2px);
}

.news-tab.active {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
    box-shadow: 0 10px 15px -3px rgba(34, 117, 186, 0.3);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    min-height: 480px;
}

.news-card {
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--brand-primary);
}

.news-image {
    width: 100%;
    height: 220px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-source {
    color: var(--brand-primary);
}

.news-location {
    color: #94a3b8;
}

.news-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.4rem; /* Fixed height for title alignment */
}

.news-excerpt {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 4.3rem; /* Fixed height for grid alignment */
}

.news-footer {
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.news-attribution {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.source-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e293b;
}

.news-date {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--brand-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

/* Shimmer Loading Animation */
.news-skeleton {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    width: 100%;
}

.shimmer-card {
    height: 480px;
    background: linear-gradient(90deg, #f1f5f9 25%, #f8fafc 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    border-radius: 1.25rem;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 1024px) {
    .news-skeleton { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; gap: 2rem; }
    .news-skeleton { grid-template-columns: 1fr; }
    .news-tabs { flex-wrap: wrap; }
    .news-tab { flex: 1; text-align: center; min-width: 120px; }
}

/* --- Dynamic Blog Grid (Home Page) --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.blog-card-home {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 1 / 1.1;
    cursor: pointer;
    background: #000;
}

.blog-card-home img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    opacity: 0.8;
}

.blog-card-home:hover img {
    transform: scale(1.1);
    opacity: 0.6;
}

.blog-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    z-index: 2;
    transition: transform 0.4s ease;
}

.blog-card-home:hover .blog-card-overlay {
    transform: translateY(-10px);
}

.blog-card-home h3 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.blog-card-home .card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-card-home {
        aspect-ratio: 16 / 10;
    }
    .blog-card-home h3 {
        font-size: 1.25rem;
    }
}

/* Authentication State Overrides */
html.pmo-signed-in #header-signin-link {
    display: none !important;
}
html.pmo-signed-in #profile-avatar-wrap {
    display: block !important;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Dynamic User Profile Header --- */
.user-profile-container {
    position: relative;
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.profile-avatar-wrap {
    position: relative;
    cursor: pointer;
    padding: 10px; /* Increase hoverable area */
    margin: -10px; /* Offset to maintain layout */
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: var(--brand-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(34, 117, 186, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(34, 117, 186, 0.3);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 240px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 1px solid #f1f5f9;
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

/* Hover Bridge to prevent dropdown from closing when moving mouse from avatar to menu */
.profile-dropdown::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
    z-index: -1;
}

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

.dropdown-header {
    padding: 8px 12px 12px;
}

#dropdown-user-name {
    display: block;
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

#dropdown-user-role {
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f8fbff;
    color: var(--brand-primary);
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: #fef2f2;
}

