/* Custom Design System for Keshavaa Seara 91 */

:root {
    --bg-primary: #FAF7F2;
    --bg-warm: #F4F0E6;
    --bg-dark: #131210;
    --bg-card: #FAF8F5;
    
    --text-primary: #1C1A17;
    --text-muted: #6B665E;
    --text-light: #E3DFD5;
    
    --accent: #C27D58; /* Muted Terracotta Accent */
    --accent-hover: #A36442;
    --border-color: #E3DFD5;
    
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    line-height: 1.8;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* Language Selection System */
[data-lang] {
    display: none !important;
}

html[lang="en"] [data-lang="en"] {
    display: block !important;
}

html[lang="es"] [data-lang="es"] {
    display: block !important;
}

/* Inline / Flex / Grid elements language toggling helper */
html[lang="en"] span[data-lang="en"],
html[lang="en"] a[data-lang="en"] {
    display: inline !important;
}

html[lang="es"] span[data-lang="es"],
html[lang="es"] a[data-lang="es"] {
    display: inline !important;
}

/* Common Layout Elements */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.container-narrow {
    max-width: 800px;
}

.section-padding {
    padding: 7.5rem 0;
}

.bg-warm {
    background-color: var(--bg-warm);
}

.bg-dark {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

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

.text-muted {
    color: var(--text-muted);
}

.align-center {
    align-items: center;
}

/* Grid Layouts */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 2rem;
}

.lead-text {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.body-text {
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 1.75rem;
    letter-spacing: -0.01em;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(250, 247, 242, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
}

.brand-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    transition: var(--transition-smooth);
}

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

.lang-divider {
    color: var(--border-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    overflow: hidden;
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(28, 26, 23, 0.4) 0%, rgba(28, 26, 23, 0.7) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: #FFFFFF;
    max-width: 800px;
    padding: 0 1.5rem;
}

.hero-tag {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--bg-primary);
}

.hero-title {
    font-size: 4rem;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    max-width: 600px;
    margin: 0 auto;
}

.hero-arrow {
    margin-top: 3rem;
    animation: bounce 2s infinite;
}

.hero-arrow svg {
    width: 24px;
    height: 24px;
    color: #FFFFFF;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* Image styling */
.image-wrapper {
    overflow: hidden;
    border-radius: 4px;
}

.featured-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: var(--transition-smooth);
}

.featured-image:hover {
    transform: scale(1.02);
}

/* Snapshot Section */
.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.snapshot-card {
    padding: 2rem 1.5rem;
    border-left: 1px solid var(--border-color);
}

.snapshot-card:first-child {
    border-left: none;
}

.snapshot-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.snapshot-label {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Location list details */
.location-stats {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.loc-stat-item {
    border-left: 2px solid var(--accent);
    padding-left: 1.25rem;
}

.loc-stat-item h4 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.loc-stat-item p {
    font-size: 0.9rem;
}

/* Specs list */
.specs-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.specs-list li strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
}

.specs-list li p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Residences Tabs */
.tabs-container {
    margin-top: 3rem;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.tab-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 1rem 2rem;
    color: var(--text-muted);
    position: relative;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    color: var(--text-primary);
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
}

.tab-panels {
    position: relative;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.6s ease;
}

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

.plan-wrapper {
    background: #FFFFFF;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.plan-image {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    display: block;
}

.residence-details {
    padding-left: 2rem;
}

.residence-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.residence-intro {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spec-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.spec-val {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--text-primary);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 2px;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition-smooth);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.cursor-zoom {
    cursor: zoom-in;
}

/* Legacy Section */
.keshavaa-section {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.legacy-projects {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 3rem;
}

.project-pill {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background-color: var(--bg-card);
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.project-pill:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

/* Contact / Enquiry Section (No forms, direct layout) */
.contact-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #FFFFFF;
}

.contact-desc {
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 500px;
    margin: 0 auto 3rem auto;
    color: var(--text-light);
}

.contact-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.contact-link-card {
    background: #1C1A17;
    border: 1px solid #2D2A24;
    padding: 2.5rem 2rem;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #FFFFFF;
}

.contact-link-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: #23211D;
}

.contact-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.contact-card-val {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #FFFFFF;
    word-break: break-all;
}

.office-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    border-top: 1px solid #2D2A24;
    padding-top: 3rem;
    text-align: left;
}

.office-card h4 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.office-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(19, 18, 16, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #FFFFFF;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 85%;
    max-height: 80%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 1rem;
    transition: var(--transition-smooth);
}

.lightbox-arrow:hover {
    color: var(--accent);
}

.lightbox-prev {
    left: -4rem;
}

.lightbox-next {
    right: -4rem;
}

/* Responsive / Mobile First adjustments */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-links-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 4.5rem 0;
    }
    
    .section-title {
        font-size: 1.85rem;
        margin-bottom: 1.25rem;
    }
    
    .lead-text {
        font-size: 1.15rem;
        margin-bottom: 1.25rem;
        line-height: 1.7;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .snapshot-num {
        font-size: 2.25rem;
    }
    
    .residence-title {
        font-size: 1.75rem;
    }
    
    .specs-grid {
        gap: 1rem;
    }
    
    .contact-title {
        font-size: 2rem;
    }
    
    .contact-link-card {
        padding: 1.75rem 1.25rem;
    }

    .grid-2col {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .reverse-mobile {
        direction: rtl;
    }
    .reverse-mobile > * {
        direction: ltr;
    }
    
    .snapshot-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .snapshot-card {
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem 1rem;
    }
    
    .snapshot-card:nth-child(2n+1) {
        border-right: 1px solid var(--border-color);
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .residence-details {
        padding-left: 0;
        margin-top: 2rem;
    }
    
    .office-info {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-section {
        height: 60vh;
        min-height: 450px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}
