/* Harmonized Architectural Color Palette */
:root {
    /* Primary Brand Colors - Warm Architectural Theme */
    --primary-gradient: linear-gradient(135deg, #8b7355 0%, #6b5b47 50%, #5a4a3a 100%);
    --primary-color: #8b7355;
    --primary-dark: #6b5b47;
    --primary-light: #a68b6b;
    --primary-accent: #5a4a3a;

    /* Secondary Colors - Earthy Beige Scale */
    --secondary-color: #7d7063;
    --secondary-dark: #54483d;
    --secondary-light: #a89d91;
    --secondary-accent: #3b3228;

    /* Neutral Text Colors - Warm Tones */
    --text-primary: #2c241c;
    --text-secondary: #54483d;
    --text-muted: #7d7063;
    --text-light: #a89d91;
    --text-white: #ffffff;

    /* Background Colors - Soft Architectural */
    --bg-primary: #f4eee2;
    --bg-secondary: #e8dfcd;
    --bg-tertiary: #d8cbb3;
    --bg-dark: #1f1a17;
    --bg-overlay: rgba(31, 26, 23, 0.85);

    /* Typography - Premium Scale */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --text-xs: clamp(0.6rem, 0.5vw + 0.5rem, 0.75rem);
    --text-sm: clamp(0.75rem, 0.6vw + 0.6rem, 0.9rem);
    --text-base: clamp(0.9rem, 0.2vw + 0.8rem, 1.05rem);
    --text-lg: clamp(1rem, 0.5vw + 0.9rem, 1.2rem);
    --text-xl: clamp(1.2rem, 0.8vw + 1rem, 1.5rem);
    --text-2xl: clamp(1.4rem, 1vw + 1.2rem, 1.8rem);
    --text-3xl: clamp(1.75rem, 2vw + 1.5rem, 2.5rem);
    --text-4xl: clamp(2.25rem, 4vw + 1.5rem, 3.5rem);
    --text-5xl: clamp(3rem, 6vw + 2rem, 5rem);
    --text-6xl: clamp(4rem, 8vw + 2rem, 7rem);

    --spacing-xs: 0.4rem;
    --spacing-sm: 0.8rem;
    --spacing-md: 2.5rem;

    --spacing-lg: 6rem;
    --spacing-xl: 6rem;

    /* Accent Colors - Architectural Palette */
    --accent-blue: #5b7c99;
    --accent-green: #6b7c32;
    --accent-orange: #b8860b;
    --accent-red: #a0522d;
    --accent-purple: #6b5b95;

    /* Interactive States - Subtle */
    --hover-primary: rgba(139, 115, 85, 0.08);
    --hover-secondary: rgba(107, 114, 128, 0.08);
    --focus-primary: rgba(139, 115, 85, 0.15);

    /* Glass Effects - Warm */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);

    /* Shadows - Soft */
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.05),
        0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-heavy: 0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 10px 10px -5px rgba(0, 0, 0, 0.02);

    /* Border Radius */
    --border-radius-sm: 2px;
    /* Sharper corners for architectural feel */
    --border-radius-md: 4px;
    --border-radius-lg: 8px;
    --border-radius-xl: 12px;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Dynamic Components */
    --nav-bg: rgba(244, 238, 226, 0.85);
    --nav-bg-scrolled: rgba(244, 238, 226, 0.98);
    --nav-border: rgba(0, 0, 0, 0.1);
    --input-border: #e5e7eb;
}

/* Dark mode overrides */
html[data-theme='dark'] {
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --primary-gradient: linear-gradient(135deg, #a68b6b 0%, #8b7355 50%, #5a4a3a 100%);
    --primary-color: #a68b6b;
    --primary-dark: #8b7355;
    --primary-light: #c9b79f;
    --nav-bg: rgba(17, 24, 39, 0.8);
    --nav-bg-scrolled: rgba(17, 24, 39, 0.95);
    --nav-border: rgba(255, 255, 255, 0.05);
    --input-border: #4b5563;
    --bg-dark: #111827;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme='light']) {
        --text-primary: #f3f4f6;
        --text-secondary: #d1d5db;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-tertiary: #374151;
        --primary-gradient: linear-gradient(135deg, #a68b6b 0%, #8b7355 50%, #5a4a3a 100%);
        --primary-color: #a68b6b;
        --primary-dark: #8b7355;
        --primary-light: #c9b79f;
        --nav-bg: rgba(17, 24, 39, 0.8);
        --nav-bg-scrolled: rgba(17, 24, 39, 0.95);
        --nav-border: rgba(255, 255, 255, 0.05);
        --input-border: #4b5563;
        --bg-dark: #111827;
        color-scheme: dark;
    }
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Responsive adjustments */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}

@media (max-width: 900px) {
    .navbar {
        height: auto;
    }

    .nav-container {
        padding: 0 15px;
        position: relative;
        height: 55px; /* Extremely compact height */
        justify-content: space-between;
    }
    
    .nav-logo {
        padding: 0;
        gap: 0.4rem;
        flex: 1; /* Allow to claim available space naturally */
    }

    .logo-image {
        height: 28px; /* Hardware-safe scaling */
        flex-shrink: 0;
    }

    .logo-text {
        font-size: 1rem; /* True responsive calculation for 300px+ width screens */
        white-space: nowrap; /* Force single line logically */
        /* Removed all manual hidden/ellipsis rules to ban the css bug */
    }

    .theme-toggle {
        margin-left: auto;
        margin-right: 15px;
        z-index: 1002;
        flex-shrink: 0; /* Force buttons to never get squished by the text */
    }

    .hamburger {
        display: flex;
        position: relative;
        z-index: 1002;
        flex-shrink: 0; /* Force hamburger to never get squished */
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding-top: 100px;
        z-index: 1001;
        /* Menu remains below toggle and hamburger */
        margin: 0;
        justify-content: flex-start;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1.5rem 0;
    }

    .nav-link {
        font-size: 1.2rem;
        font-weight: 500;
        color: var(--text-primary);
    }

    .gallery-item {
        flex: 0 0 clamp(150px, 45vw, 350px);
        height: 240px;
    }

    .projects-header {
        margin-bottom: 0.8rem;
    }

    .portfolio-row-title {
        margin: 0.4rem 0 0.2rem 5%;
    }

    .hero-title {
        font-size: var(--text-3xl);
    }

    .hero-subtitle {
        font-size: var(--text-base);
    }
}

@media (max-width: 600px) {
    .navbar .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .gallery-item {
        flex: 0 0 clamp(120px, 60vw, 300px);
        height: auto;
        /* Let the image define the height completely to avoid padding letterboxes */
    }

    .contact-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .projects-header {
        margin-bottom: 0.5rem;
    }

    .portfolio-row-title {
        margin-top: 1.5rem;
        margin-bottom: 0;
    }

    .gallery-container {
        padding: 0;
        margin-top: -15px;
        /* Pulls the gallery up to eat the invisible transform padding gap */
    }
}

/* Global Reset & Typography Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text-secondary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

h1 {
    font-size: var(--text-5xl);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--text-4xl);
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

p {
    margin-bottom: 1.5rem;
}

/* Enhanced scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

/* Modern backdrop blur support */
@supports (backdrop-filter: blur(10px)) {
    .navbar {
        backdrop-filter: blur(20px);
        background: var(--nav-bg);
    }

    .navbar.scrolled {
        backdrop-filter: blur(30px);
        background: var(--nav-bg-scrolled);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Preloader */
/* Preloader styles removed */

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--nav-bg-scrolled);
    /* Fallback if no blur */
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--nav-border);
}

.navbar.scrolled {
    background: var(--nav-bg-scrolled);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    /* Reduced navbar height */
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem;
    border-radius: 8px;
    /* Slightly softer */
    position: relative;
}

.nav-logo:hover {
    transform: translateY(-2px);
    background: var(--hover-primary);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.15);
}

.nav-logo:active {
    transform: translateY(0);
}

.logo-image {
    height: 45px;
    width: auto;
    border-radius: 2px;
    /* Very subtle to not crop text */
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-logo:hover .logo-image {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.2);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    background: none;
    -webkit-text-fill-color: var(--text-primary);
    letter-spacing: -0.02em;
    transition: var(--transition-smooth);
}

.nav-logo:hover .logo-text {
    transform: scale(1.05);
    animation-duration: 1.5s;
}

@keyframes logoGradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    /* Slightly reduced gap to accommodate the toggle */
    margin-left: auto;
    /* Push nav menu to the right */
    margin-right: 2rem;
    /* Spacing between nav and toggle */
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

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

.nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: -5%;
    /* Overflow to allow mouse parallax */
    left: -5%;
    width: 110%;
    /* 110% width to allow for panning */
    height: 110%;
    background: url('../images/modern_apartment_hero.png') center/cover no-repeat;
    z-index: -1;
    overflow: hidden;
    transition: transform 0.1s ease-out;
    /* Smooth mouse panning */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Keep a very light gradient to ensure text readability over the 3D meshes */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    /* Make sure it stays on top of the vanta canvas and behind text */
    pointer-events: none;
    /* Let mouse interact with 3D canvas */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 50px 50px;
    text-align: center;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.hero-title {
    font-size: clamp(2rem, 10vw, 4rem); /* Responsive fluid typography scaling */
    /* Reduced from 5rem */
    font-weight: 700;
    margin-bottom: 2rem;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.03em;
    line-height: 1.1;
    opacity: 1;
    transform: translateZ(50px);
    -webkit-text-fill-color: initial;
    background: none;
    transition: transform 0.2s ease-out;
}

.hero-subtitle {
    font-size: 1.2rem;
    /* Reduced from 1.4rem */
    margin-bottom: 3rem;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    opacity: 1;
    transform: translateZ(30px);
    animation: none;
    transition: transform 0.2s ease-out;
}

.cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: white;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: var(--text-base);
    transition: all 0.3s ease;
    opacity: 1;
    animation: none;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateZ(20px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cta-button:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.cta-button::before {
    display: none;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0.8;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) rotate(45deg) translateY(0);
    }

    40% {
        transform: translateX(-50%) rotate(45deg) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) rotate(45deg) translateY(-5px);
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: var(--text-5xl);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
    transition: width 0.4s ease-in-out;
}

.section-title:hover::after {
    width: 120px;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

/* About Section */


.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* About Section */
.about {
    padding: var(--spacing-lg) 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.about::before {
    display: none;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    /* Full width for cards to shine */
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
}

.about-text {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
}

.about-intro,
.about-philosophy,
.about-vision {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.about-intro:hover,
.about-philosophy:hover,
.about-vision:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    border-left-width: 6px;
}

.about-text h3 {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 1rem;
}

.about-text h3::after {
    display: none;
    /* Remove underline for cleaner look */
}

.about-text p {
    margin-bottom: 0;
    color: var(--text-primary);
    opacity: 0.85;
    line-height: 1.7;
    font-size: var(--text-base);
}





/* Hiding the side image to focus on the text blocks as "Services/Values" cards */
.about-image {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.about-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Projects Section */
.projects {
    padding: 2rem 0;
    /* Compact vertical padding */
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
    min-height: auto;
    /* Removed 100vh for less air */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.projects-header {
    text-align: center;
    margin-bottom: 1rem;
    /* Reduced bottom margin */
}

/* Seamless Projects Gallery */
.gallery-container {
    width: 100%;
    overflow-x: auto;
    /* Support native scroll/swipe */
    overflow-y: hidden;
    position: relative;
    padding: 0.25rem 0;
    /* Further reduced vertical padding */
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    /* Smooth mobile scroll */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    scroll-behavior: auto;
}

/* --- Category Grid --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.category-grid.fade-out {
    opacity: 0;
    pointer-events: none;
}

.category-grid.hidden {
    display: none;
}

.category-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
    box-shadow: var(--shadow-medium);
}

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

.category-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10; /* Gives a nice wide aspect for the slides */
    background: var(--bg-primary); /* Fills any aspect ratio gaps with theme color */
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain; /* Prevents both cropping and warping! */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .category-image img {
    transform: scale(1.08);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.view-text {
    color: white;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid white;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
}

.category-card:hover .view-text {
    transform: translateY(0);
}

/* Ensure View Gallery is persistently visible on mobile/touch devices since hover doesn't work */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
    .category-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 40%, transparent 100%);
        align-items: flex-end; /* Move to bottom instead of center on mobile */
        padding-bottom: 5%;
    }
    .view-text {
        transform: translateY(0);
        padding: 0.4rem 1.2rem;
        font-size: 0.85rem;
    }
}

.category-info {
    padding: 1.5rem;
    text-align: center;
}

.category-info h3 {
    margin: 0;
    font-size: var(--text-lg);
    font-family: var(--font-heading);
    color: var(--text-primary);
}

/* --- Category Reveal View --- */
.category-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.category-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.back-button {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    transition: background 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button:hover {
    background: var(--primary-color);
    color: white;
}

.reveal-title-container {
    max-width: 800px;
}

.reveal-title {
    font-size: var(--text-3xl);
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.reveal-description {
    color: var(--text-secondary);
    font-size: var(--text-base);
    line-height: 1.6;
    margin: 0;
}

.reveal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.reveal-item {
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
}

.reveal-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-medium);
}

.reveal-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 8px 8px 0 0;
}

.reveal-item-caption {
    padding: 1rem;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

/* Contact Section */
.contact {
    padding: 3rem 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
    overflow: hidden;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-form-container,
.contact-info {
    flex: 1 1 400px;
    /* Minimum width of 400px before wrapping to column */
}

.contact-form {
    background: transparent;
    padding: 2rem;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    height: fit-content;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-form:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.25rem;
    border: none;
    border-bottom: 2px solid var(--input-border);
    border-radius: 0;
    font-size: var(--text-lg);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: inherit;
    background: transparent;
    color: var(--text-primary) !important;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: none;
    background: transparent;
    transform: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
    opacity: 0.7;
}


.error-message {
    color: var(--primary-color);
    font-size: var(--text-sm);
    margin-top: 0.5rem;
    display: block;
}

.submit-button {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.form-success {
    background: #d4edda;
    color: #155724;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.form-success h3 {
    margin-bottom: 1rem;
    color: #155724;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: auto;
    overflow-wrap: break-word; /* Absolutely critical for the email string */
    word-break: break-word;
}

.contact-details {
    background: transparent;
    padding: 2rem;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    border: none;
    flex: 0 1 auto;
    transition: all 0.3s ease;
}

.contact-details:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.contact-details h3 {
    font-size: var(--text-2xl);
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 0;
    border-radius: 0;
    transition: all 0.3s ease;
    background: transparent;
    backdrop-filter: none;
    border: none;
    align-items: start;
}

.contact-item:hover {
    background: transparent;
    transform: translateX(5px);
    box-shadow: none;
    border-color: transparent;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    font-size: 1.2rem;
    width: auto;
    height: auto;
    display: block;
    background: transparent;
    border-radius: 0;
    color: var(--primary-color);
    box-shadow: none;
    transition: all 0.3s ease;
    padding-top: 2px;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1);
    box-shadow: none;
}

.contact-text h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-text p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-text a {
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.contact-text a:hover {
    color: var(--primary-color) !important;
}

/* Map Container */
.map-container {
    background: transparent;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    flex: 1;
    min-height: 400px;
    max-height: 500px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
}



/* Footer - Neat & Premium */
.footer {
    background-color: var(--bg-dark);
    color: #e5e7eb;
    padding: 5rem 0 2rem;
    margin-top: auto;
    position: relative;
    font-size: 0.95rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

.footer-section h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease-in-out;
}

.footer-section h4:hover::after {
    width: 60px;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-contact p {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #9ca3af;
}

.footer-contact a {
    color: #9ca3af !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--primary-color) !important;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin: 0;
}

/* Responsive Footer & Global Mobile Fixes */
@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    .footer-contact p {
        justify-content: center;
    }
    .category-grid, .reveal-gallery {
        grid-template-columns: 1fr;
        padding: 1rem 5%;
    }
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
    #lightbox-caption {
        font-size: var(--text-base);
        width: 95%;
        padding: 10px 0;
    }
}

/* --- Unified Premium Button Styles --- */

/* Base Button Style */
.cta-button,
.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.25);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Hover Effects */
.cta-button:hover,
.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.4);
    color: white;
}

/* Active/Focus States */
.cta-button:active,
.submit-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

/* Shine Effect on Hover */
.cta-button::after,
.submit-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.cta-button:hover::after,
.submit-button:hover::after {
    left: 100%;
}



/* Accessible hidden text for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #fff;
    font-size: 60px;
    font-weight: 200;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--primary-light);
    transform: rotate(90deg);
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 20px 0;
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    letter-spacing: 1px;
}

/* 3D Animations */
.animate-3d {
    opacity: 0;
    transform: perspective(1000px) rotateX(10deg) translateY(40px) scale(0.95);
    transform-origin: center bottom;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease-out;
    will-change: transform, opacity;
}

.animate-3d.in-view {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg) translateY(0) scale(1);
}

.animate-3d.delay-1 {
    transition-delay: 0.1s;
}

.animate-3d.delay-2 {
    transition-delay: 0.2s;
}

.animate-3d.delay-3 {
    transition-delay: 0.3s;
}

.animate-3d.delay-4 {
    transition-delay: 0.4s;
}

/* -------------------------------------- */
/* Back To Top Button                     */
/* -------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--nav-border);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    transform: translateY(-5px);
}

/* -------------------------------------- */
/* Mobile-specific Animation Adjustments  */
/* -------------------------------------- */
@media (max-width: 768px) {
    /* Reduce the scroll travel distance and speed it up */
    .animate-3d {
        transform: perspective(1000px) rotateX(5deg) translateY(15px) scale(0.98);
        transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease-out;
    }

    /* Kill staggered delays immediately so everything visible loads immediately when scrolled to */
    .animate-3d.delay-1,
    .animate-3d.delay-2,
    .animate-3d.delay-3,
    .animate-3d.delay-4 {
        transition-delay: 0s;
    }
}

/* -------------------------------------- */
/* Global Layout Stabilization            */
/* -------------------------------------- */
html, body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}