/**
 * Luxury Interior Solutions – Base styles
 * Brand: darker green #072F2D, luxury gold #C89A5A. Layout in layout.css, gallery in gallery.css.
 */

:root {
    /* Primary brand colors (darker green for stronger contrast) */
    --brand-green: #072F2D;
    --brand-green-dark: #052321;
    --brand-gold: #C89A5A;
    --brand-gold-light: #D9B37B;
    --text-light: #F5F5F5;
    --glass-bg: rgba(7, 47, 45, 0.55);
    /* Aliases for components (map to brand) */
    --color-bg-dark: var(--brand-green);
    --color-bg-charcoal: var(--brand-green-dark);
    --color-bg-card: rgba(7, 47, 45, 0.4);
    --color-green: var(--brand-green);
    --color-green-light: #0a3d3a;
    --color-gold: var(--brand-gold);
    --color-gold-light: var(--brand-gold-light);
    --color-gold-muted: rgba(200, 154, 90, 0.35);
    --color-gold-subtle: rgba(200, 154, 90, 0.12);
    --color-text: var(--text-light);
    --color-text-muted: rgba(245, 245, 245, 0.82);
    --color-overlay: rgba(7, 47, 45, 0.88);
    --color-overlay-gradient: linear-gradient(180deg, rgba(5, 35, 33, 0.5) 0%, rgba(7, 47, 45, 0.55) 50%, rgba(5, 35, 33, 0.92) 100%);
    --color-glass: var(--glass-bg);
    --color-glass-border: rgba(200, 154, 90, 0.4);
    /* Typography */
    --font-display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', 'Montserrat', sans-serif;
    /* Spacing scale (px) */
    --space-8: 8px;
    --space-16: 16px;
    --space-24: 24px;
    --space-32: 32px;
    --space-48: 48px;
    --space-64: 64px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 0.2s ease;
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --header-h: 80px;
    --header-h-mobile: 64px;
    --sidebar-w: 260px;
    --content-max: 1440px;
    --tap-min: 44px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--text-light);
    background-color: var(--brand-green);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--brand-gold);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--brand-gold-light);
}

/* Subtle fade-in for sections */
.animate-in {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-in.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Primary / secondary buttons (frontend) */
.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--brand-gold);
    color: #0A3D3B;
}
.btn-primary:hover {
    background: var(--brand-gold-light);
}
.btn-secondary {
    border: 1px solid var(--brand-gold);
    color: var(--brand-gold);
    background: transparent;
}
.btn-secondary:hover {
    background: rgba(200, 154, 90, 0.12);
}

.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;
}

/* Galería: altura por defecto (Residential/Commercial anulan en layout.css sobre el hero) */
#gallery-container {
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

/* Área interna (rejilla + paginado) ocupa alto disponible */
#gallery-container > .gallery-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

/* Sidebar: sin scroll; altura según contenido */
.section-layout-aside {
    min-height: auto;
    height: auto !important;
    overflow: visible !important;
}

.category-link.is-active,
.category-link.active {
    color: #c5a059 !important;
    font-weight: bold;
}

/* Rejilla compacta; paginado cerca de las fotos */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 12px 0 0;
    flex-grow: 1;
    margin-bottom: 16px;
    align-content: start;
}

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

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Paginado: anclado al pie sin hueco enorme (20px separa de la rejilla) */
.pagination-container {
    margin-top: 12px;
    padding: 8px 0 12px;
    border-top: 1px solid rgba(197, 160, 89, 0.2);
    display: flex;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
}

.gallery-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
    background: #012a23;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(0.9);
}

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

/* Paginado (controles dentro de .pagination-container) */
.pagination-pages {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    padding-bottom: 0;
}

.pagination-page {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}

.pagination-page.is-current {
    background: #ffffff;
    color: #01352c;
    border-color: #ffffff;
}
