/* ==========================================================================
   SILVIA TCHERASSI - Página de Caso de Éxito
   Estilos consistentes con Roca Arquitectos (idénticos a Aruma)
   ========================================================================== */
:root {
    --color-bg: #fdfdfd;
    --color-bg-alt: #f7f7f7;
    --color-dark: #0f0f0f;
    --color-primary: #d90429;
    --color-primary-hover: #b00321;
    --color-text: #0f0f0f;
    --color-text-muted: #666666;
    --color-white: #FFFFFF;
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-dark);
    line-height: 1.2;
}

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

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

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ==========================================================================
   Header (consistente con Index)
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 0;
    z-index: 1000;
    background: rgba(253, 253, 253, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: padding var(--transition-fast);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.badge-15-years {
    border-left: 2px solid var(--color-primary);
    padding-left: 12px;
}

.badge-years {
    display: block;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--color-primary);
    line-height: 1;
}

.badge-text {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--color-dark);
}

.nav-links {
    display: flex;
    gap: 1.8rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-dark);
}

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

.btn-contact {
    background: var(--color-primary);
    color: var(--color-white) !important;
    padding: 0.55rem 1.1rem;
    border-radius: 2px;
    font-size: 0.85rem;
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background-color: var(--color-dark);
}

@media (max-width: 992px) {
    .mobile-menu-btn { display: flex; }
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--color-dark);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease;
        z-index: 1001;
    }
    .nav.active { right: 0; }
    .nav-links {
        flex-direction: column;
        gap: 1.8rem;
    }
    .nav-links a {
        color: var(--color-white) !important;
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Project Hero / Intro
   ========================================================================== */
.project-hero {
    padding: 9rem 0 3.5rem;
    background: var(--color-bg);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    transition: color var(--transition-fast);
}

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

.project-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.project-intro {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--color-text-muted);
    max-width: 780px;
    margin-bottom: 3rem;
}

/* Métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 1.75rem 0;
}

.metric-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
}

.metric-icon {
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.metric-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.metric-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-dark);
    line-height: 1.35;
}

@media (max-width: 900px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

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

/* ==========================================================================
   Galería
   ========================================================================== */
.project-gallery {
    padding: 1rem 0 4rem;
}

.gallery-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #eee;
    box-shadow: var(--shadow-md);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background var(--transition-fast), transform var(--transition-fast);
    z-index: 2;
}

.gallery-nav:hover {
    background: var(--color-white);
    transform: translateY(-50%) scale(1.08);
}

.gallery-prev { left: 16px; }
.gallery-next { right: 16px; }

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) transparent;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 5px;
}

.gallery-thumbs::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

.thumb {
    flex: 0 0 auto;
    width: 90px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    opacity: 0.6;
    transition: opacity var(--transition-fast), border-color var(--transition-fast);
    scroll-snap-align: center;
}

.thumb.active,
.thumb:hover {
    opacity: 1;
    border-color: var(--color-primary);
}

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

/* ==========================================================================
   Proceso
   ========================================================================== */
.project-process {
    padding: 4rem 0 5rem;
    background: var(--color-bg-alt);
}

.process-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.process-line {
    width: 40px;
    height: 3px;
    background: var(--color-primary);
}

.process-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.process-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.process-step {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.process-step.reverse {
    direction: rtl;
}

.process-step.reverse > * {
    direction: ltr;
}

.process-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.6rem;
}

.process-step h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
}

.process-step p {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.process-step-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 4 / 3;
}

.process-step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 800px) {
    .process-step,
    .process-step.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 1.5rem;
    }
}

/* ==========================================================================
   CTA
   ========================================================================== */
.project-cta {
    padding: 5rem 0;
    background: var(--color-dark);
    text-align: center;
    color: var(--color-white);
}

.project-cta h2 {
    color: var(--color-white);
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.project-cta p {
    color: rgba(255,255,255,0.75);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-block;
    padding: 0.95rem 2.2rem;
    background-color: var(--color-primary);
    color: var(--color-white) !important;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.7);
    padding: 3.5rem 0 1.5rem;
}

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

.footer h3, .footer h4 {
    color: var(--color-white);
    margin-bottom: 0.9rem;
}

.footer-tagline {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.footer ul {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

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

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

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ==========================================================================
   Drawer de contacto
   ========================================================================== */
.drawer-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: 0; right: -450px;
    width: 100%; max-width: 420px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.drawer.open { right: 0; }

.drawer-header {
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    margin: 0;
    font-size: 1.15rem;
}

.drawer-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.drawer-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.drawer-content > p {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
}

.form-group textarea {
    resize: vertical;
}


/* --- Menús Desplegables (igual que Index) --- */
.dropdown {
    position: relative;
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    min-width: 220px;
    border-radius: 4px;
    z-index: 1001;
    border: 1px solid #eee;
}
.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.dropdown-menu li { padding: 0; }
.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.4rem;
    color: #0f0f0f;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.dropdown-menu a:hover {
    background-color: #f7f7f7;
    color: #d90429;
    padding-left: 1.6rem;
}
.nav-link-standard {
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f0f0f;
    position: relative;
}
.nav-link-standard::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #d90429;
    transition: width 0.3s ease;
}
.nav-link-standard:hover::after {
    width: 100%;
}
.logo-img {
    height: 70px !important;
    width: auto;
    object-fit: contain;
}
.header {
    padding: 1.1rem 0 !important;
}
.header-container {
    max-width: 1400px;
}
.nav-links {
    gap: 1.8rem !important;
}


/* Mobile menu: X + overlay + dropdown click */
@media (max-width: 992px) {
    .mobile-menu-btn { z-index: 1002; }
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
        background-color: #fff;
    }
    .mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
        background-color: #fff;
    }
    .nav { overflow-y: auto; padding: 4rem 0 2rem; }
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 1000;
    }
    .nav-overlay.open { display: block; }
    .dropdown-menu {
        position: static !important;
        display: none !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        min-width: 0 !important;
        padding: 0.4rem 0 0.2rem 0.75rem !important;
    }
    .dropdown.open > .dropdown-menu { display: block !important; }
    .dropdown-menu a {
        color: rgba(255,255,255,0.8) !important;
        padding: 0.45rem 0.75rem !important;
        font-size: 0.95rem !important;
    }
}

/* Language Switcher ES | EN */
.lang-switcher { display: flex; align-items: center; gap: 6px; margin-left: 0.5rem; }
.lang-btn {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.5px;
  color: var(--color-dark, #0f0f0f); padding: 4px 8px; border-radius: 3px;
  transition: color 0.2s ease, background 0.2s ease; text-decoration: none;
}
.lang-btn:hover { color: var(--color-primary, #d90429); }
.lang-btn.active { color: var(--color-primary, #d90429); background: rgba(217, 4, 41, 0.08); }
.lang-divider { color: #ccc; font-size: 0.75rem; user-select: none; }
@media (max-width: 992px) {
  .lang-switcher { margin-left: 0; margin-top: 0.5rem; justify-content: flex-start; }
  .nav-links .lang-btn { color: rgba(255,255,255,0.85) !important; font-size: 1rem; }
  .nav-links .lang-btn.active { color: #fff !important; background: rgba(217, 4, 41, 0.35); }
  .nav-links .lang-divider { color: rgba(255,255,255,0.4); }
}
