/* Montserrat Font loaded via header.php for performance */

:root {
    --primary: #CD7F32;
    --primary-light: #F4E4BC;
    --onyx: #1A1A1A;
    --pearl: #FDFCFB;
    --surface: #FFFFFF;
    --shadow-premium: 0 40px 100px rgba(0, 0, 0, 0.1);
    --shadow-glass: 0 10px 30px rgba(0, 0, 0, 0.02);
    --font-main: 'Montserrat', sans-serif;
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--pearl);
    color: var(--onyx);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main, .page-content {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

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

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

.section-title span {
    color: var(--primary);
}

.section-subtitle {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.6em;
    display: block;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-luxury {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    background-color: var(--onyx);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-luxury:hover {
    background-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    background-color: transparent;
    border: 2px solid #E2E8F0;
    color: var(--onyx);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: white;
    box-shadow: var(--shadow-glass);
}

.project-card:hover img {
    transform: scale(1.1);
    opacity: 1 !important;
}

.project-card:hover h3 {
    color: var(--primary);
}

.btn-outline-gold:hover {
    background: var(--primary);
    border-color: var(--primary) !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(197, 165, 114, 0.2);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    box-shadow: var(--shadow-glass);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--onyx);
    letter-spacing: -0.05em;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--pearl), rgba(241, 245, 249, 0.2), transparent);
    backdrop-filter: blur(1px);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1000px;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 8rem);
    margin-bottom: 2rem;
}

.hero p {
    font-size: 1.25rem;
    color: #64748B;
    max-width: 600px;
    border-left: 4px solid var(--primary);
    padding-left: 2rem;
    margin-bottom: 3rem;
    font-style: italic;
}

/* Stats */
.stats {
    padding: 10rem 0;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: #94A3B8;
}

/* Services */
.services {
    padding: 10rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    position: relative;
    height: 500px;
    border-radius: 3rem;
    overflow: hidden;
    background-color: var(--onyx);
    transition: var(--transition);
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover img {
    transform: scale(1.15);
    opacity: 0.8;
}

.service-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.9));
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.scale-up {
    opacity: 0;
    transform: scale(0.9);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scale-up.active {
    opacity: 1;
    transform: scale(1);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-container {
    display: flex;
    overflow: hidden;
    padding: 2rem 0;
    width: 100%;
}

.marquee-content {
    display: flex;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
    will-change: transform;
}

.marquee-item {
    flex: 0 0 320px;
    text-align: center;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .marquee-content {
        animation-duration: 20s; /* Faster on mobile to feel same as desktop */
    }
    .marquee-item {
        flex: 0 0 220px; /* Slightly smaller on mobile */
    }
}

/* Mobile */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* Global Mobile Header Spacing Fix */
    main > section:first-of-type,
    body > section:first-of-type,
    .page-header,
    .hero,
    .media-hero {
        padding-top: 140px !important;
    }

    section {
        overflow-x: hidden; /* Prevents auto-zoom/horizontal scroll issues */
    }

    /* Overflow Prevention */
    h1, h2, h3, p, span {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    /* Prevent bottom gap */
    html, body {
        height: auto;
        min-height: 100%;
        margin: 0;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .section-title {
        font-size: 2.2rem; /* Slightly smaller for mobile */
        line-height: 1.2;
    }
    
    .section-subtitle {
        letter-spacing: 0.2em !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Card Alignment Fix */
    .projects-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        min-height: auto !important; /* Allow auto height on mobile */
    }
}

/* Desktop Card Alignment for Projects */
@media (min-width: 1025px) {
    .projects-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }

    .project-card {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 550px; /* Standardize desktop height */
    }

    .project-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .project-info h3 {
        min-height: 3.5rem; /* Ensure 2 lines alignment */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .project-meta {
        margin-top: auto;
    }
}

/* Swiper / Gallery Touch Fix */
.swiper-container, .swiper-slide, .gallery-item, .viewer-container, .swiper-wrapper {
    touch-action: pan-y !important; /* Prevents vertical scroll while swiping horizontally */
}

/* Viewport Fix for auto-zoom */
input, select, textarea, button {
    font-size: 16px !important;
}

/* Global Responsive Table Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Admin Components */
.nav-item {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-radius: 1.25rem;
    color: #94A3B8;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    transition: var(--transition);
    text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.admin-card {
    background: white;
    padding: 3rem;
    border-radius: 2.5rem;
    box-shadow: var(--shadow-glass);
    border: 1px solid white;
}

.footer-link {
    color: #94A3B8;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

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

