/* --- Variables & Reset --- */
:root {
    --primary: #0f172a; /* Azul oscuro profundo */
    --primary-light: #1e293b;
    --accent: #c4a05e;  /* Dorado elegante */
    --accent-hover: #b08d4e;
    --text-dark: #2c3e50;
    --text-light: #f4f4f4;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --nav-height: 90px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Espacio extra para el header fijo */
}

body {
    font-family: 'Raleway', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 700; }
a { text-decoration: none; transition: 0.3s; color: inherit; }
ul { list-style: none; }

/* --- Layout Generico --- */
.container { max-width: 1300px; margin: 0 auto; padding: 0 30px; }
.section-padding { 
    padding: 140px 0 80px 0; /* Más padding superior para compensar header */
    scroll-margin-top: 120px; /* Espacio adicional para scroll */
}
.bg-light { background-color: var(--bg-light); }
.bg-white { background-color: var(--bg-white); }
.bg-dark { background-color: var(--primary); color: var(--text-light); }
.text-center { text-align: center; }

.section-title {
    font-size: 2.8rem; margin-bottom: 1.5rem; position: relative; display: inline-block;
}
.section-title::after {
    content: ''; display: block; width: 80px; height: 3px; background: var(--accent); margin: 20px auto 0;
}
.section-desc { max-width: 800px; margin: 0 auto 60px; color: #555; font-size: 1.1rem;}
.intro-text { line-height: 1.8; }
.section-subtitle { 
    color: rgba(255,255,255,0.7); 
    font-size: 1rem; 
    margin-bottom: 50px;
    font-weight: 400;
}
.title-white { color: white; }

/* --- Header & Nav --- */
#main-header {
    position: fixed; top: 0; width: 100%; height: var(--nav-height); z-index: 1000;
    transition: all 0.4s ease; display: flex; align-items: center;
    background: rgba(15, 23, 42, 0.2); border-bottom: 1px solid rgba(255,255,255,0.05);
}
#main-header.scrolled {
    background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(15px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); height: 75px;
}
.navbar { display: flex; justify-content: space-between; align-items: center; width: 100%; position: relative; }
.logo img { height: 55px; transition: 0.3s; filter: invert(1) brightness(100); }
#main-header.scrolled .logo img { height: 45px; }

.nav-links { display: flex; gap: 35px; }
.nav-links a {
    color: rgba(255,255,255,0.9); font-weight: 600; font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 1px; position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0;
    background-color: var(--accent); transition: width 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.menu-toggle {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.96);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 1301;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}
.menu-toggle::before,
.menu-toggle::after,
.menu-toggle .menu-toggle-bar {
    position: absolute;
    left: 50%;
    width: 22px;
    height: 2px;
    border-radius: 99px;
    background: #fff;
    transform-origin: center;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.menu-toggle::before,
.menu-toggle::after {
    content: '';
}
.menu-toggle::before {
    top: 50%;
    transform: translate(-50%, -8px);
}
.menu-toggle .menu-toggle-bar {
    top: 50%;
    transform: translate(-50%, -50%);
}
.menu-toggle::after {
    top: 50%;
    transform: translate(-50%, 8px);
}
.menu-toggle.active::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.menu-toggle.active .menu-toggle-bar {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0.2);
}
.menu-toggle.active::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.menu-toggle:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* --- Hero Section (Mejorado con Scroll Indicator) --- */
.hero {
    height: 100vh; min-height: 600px;
    background: url('Asset/Cuerpo2-scaled.jpg') no-repeat center center/cover;
    background-attachment: fixed; display: flex; align-items: center; position: relative;
}
.hero-overlay {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.5) 100%);
}
.hero-content { 
    position: relative; z-index: 1; color: white; margin-top: 60px; max-width: 900px; 
    border-left: 5px solid var(--accent); padding-left: 40px;
}
.hero-subtitle {
    display: block; font-family: 'Raleway', sans-serif; text-transform: uppercase; 
    letter-spacing: 3px; font-size: 0.9rem; margin-bottom: 10px; color: var(--accent);
}
.hero h1 { font-size: 4rem; margin-bottom: 20px; line-height: 1.1; }
.hero p { font-size: 1.3rem; margin-bottom: 40px; max-width: 700px; opacity: 0.9; }
.hero-btns { display: flex; gap: 20px; flex-wrap: wrap; }

/* Scroll Down Indicator */
.scroll-indicator {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.7); display: flex; flex-direction: column; align-items: center;
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px;
    animation: bounce 2s infinite; cursor: pointer;
}
.scroll-indicator i { margin-top: 10px; font-size: 1.2rem; color: var(--accent); }

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

/* Botones */
.btn {
    padding: 18px 40px; border-radius: 50px; font-weight: 700; font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 1px; cursor: pointer; display: inline-block; transition: 0.3s;
    border: none;
}
.btn-primary { background: var(--accent); color: white; border: 2px solid var(--accent); box-shadow: 0 10px 20px -10px rgba(196, 160, 94, 0.5);}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-3px); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.5); margin-left: 0; }
.btn-outline:hover { background: white; color: var(--primary); border-color: white; transform: translateY(-3px); }

/* --- Nosotros --- */
.values-grid { display: flex; justify-content: center; gap: 50px; margin-top: 60px; flex-wrap: wrap; }
.value-item { text-align: center; }
.value-item i { font-size: 2.5rem; color: var(--accent); margin-bottom: 15px; display: block; }
.value-item h4 { font-size: 1.2rem; }

/* --- Servicios Grilla (Con SVGs reales) --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }

.service-card {
    text-align: center; padding: 50px 30px; background: white; border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05); transition: 0.4s; border: 1px solid #eee;
}
.service-card:hover { transform: translateY(-15px); border-color: var(--accent); box-shadow: 0 20px 40px rgba(196, 160, 94, 0.2); }

.icon-circle {
    width: 80px; height: 80px;
    background: rgba(15, 23, 42, 0.05); 
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 25px; transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.service-icon {
    width: 40px; height: 40px;
    fill: var(--primary);
    transition: all 0.4s ease;
}
.service-card:hover .icon-circle {
    background: var(--accent); 
    transform: rotateY(180deg);
}
.service-card:hover .service-icon {
    fill: white;
}
.service-card h3 { margin-bottom: 15px; font-size: 1.4rem; }
.service-card p { color: #666; line-height: 1.6; }

/* --- Equipo --- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; align-items: start; }
@media (min-width: 1024px) { .team-grid { grid-template-columns: repeat(4, 1fr); } }

.team-member {
    cursor: pointer; background: rgba(255,255,255,0.03); padding: 25px; border-radius: 12px;
    transition: 0.3s; border: 1px solid rgba(255,255,255,0.05);
}
.img-wrapper { overflow: hidden; border-radius: 8px; margin-bottom: 20px; height: 320px;}
.team-member img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.2); transition: 0.5s; }
.team-member:hover img { filter: grayscale(30%) contrast(1.1); }
.team-member.active img { filter: grayscale(0%); transform: scale(1.05); }
.team-member.active { background: rgba(255,255,255,0.08); box-shadow: 0 20px 40px rgba(0,0,0,0.4); border-color: var(--accent); }
.member-info h3 { margin: 0 0 5px; color: var(--accent); font-size: 1.5rem; }
.member-info span { font-size: 0.95rem; font-weight: 500; opacity: 0.7; letter-spacing: 1px; display: block; margin-bottom: 15px;}
.bio-details { max-height: 0; overflow: hidden; transition: all 0.6s ease-in-out; opacity: 0; margin-top: 0; font-size: 0.95rem; color: rgba(255,255,255,0.8); }
.bio-details ul { margin-top: 15px; padding-left: 20px; }
.bio-details li { margin-bottom: 8px; list-style: disc; }
.team-member.active .bio-details { max-height: 600px; opacity: 1; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(196, 160, 94, 0.3); }

/* --- Contacto --- */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; margin-bottom: 60px; align-items: start; }
.contact-card, .form-card { background: white; padding: 50px; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.08); }
.contact-card h3, .form-card h3 { 
    font-size: 1.8rem; 
    color: var(--primary); 
    margin-bottom: 30px; 
    border-bottom: 3px solid var(--accent);
    padding-bottom: 15px;
}
.info-item { display: flex; gap: 20px; margin-bottom: 25px; align-items: flex-start; }
.info-item i { width: 50px; color: var(--accent); font-size: 1.4rem; margin-top: 5px; flex-shrink: 0; }
.info-item strong { display: block; color: var(--primary); margin-bottom: 5px; font-size: 1.05rem; }
.info-item p { color: #666; margin: 0; }
.info-item a { color: var(--accent); }
.info-item a:hover { text-decoration: underline; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.input-group { position: relative; margin-bottom: 30px; }
.input-group input, .input-group textarea, .styled-select { 
    width: 100%; padding: 18px 20px; border: 2px solid #eee; border-radius: 10px; 
    outline: none; background: transparent; font-family: inherit; font-size: 1rem; 
    color: var(--text-dark); transition: 0.3s; 
}
.input-group input:focus, .input-group textarea:focus, .styled-select:focus {
    border-color: var(--accent);
}
.input-group label { 
    position: absolute; left: 20px; top: 20px; color: #aaa; 
    pointer-events: none; transition: 0.3s; font-weight: 500; 
}
.input-group input:focus ~ label, .input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label, .input-group textarea:not(:placeholder-shown) ~ label { 
    top: -12px; left: 15px; font-size: 0.85rem; background: white; 
    padding: 0 8px; color: var(--accent); font-weight: 700; 
}
.styled-select { 
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    cursor: pointer;
}
.full-width { width: 100%; border-radius: 10px; padding: 20px; font-size: 1.1rem; }
.map-container { box-shadow: 0 20px 60px rgba(0,0,0,0.1); border-radius: 20px; overflow: hidden; height: 450px; margin-top: 40px; }

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    display: none;
}
.form-message.success {
    background: #c6f6d5;
    color: #22543d;
    display: block;
}
.form-message.error {
    background: #fed7d7;
    color: #742a2a;
    display: block;
}

/* --- WhatsApp Button --- */
.whatsapp-btn {
    position: fixed; bottom: 40px; right: 40px;
    width: 65px; height: 65px;
    background: #25d366; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    z-index: 2000; transition: all 0.3s ease;
}
.whatsapp-icon {
    width: 38px; height: 38px;
    fill: white;
}
.whatsapp-btn:hover { transform: scale(1.1); box-shadow: 0 15px 40px rgba(37, 211, 102, 0.6); background: #20bd5a; }

/* --- Animaciones Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Footer --- */
footer { background: #0a0f1c; color: #999; padding: 50px 0; font-size: 0.95rem; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.footer-left p { margin: 0; }
.footer-right span { color: var(--accent); font-weight: 700; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3rem; }
    .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
    .form-row { grid-template-columns: 1fr; }
    .values-grid { gap: 30px; }
}

@media (max-width: 768px) {
    .menu-toggle { display: inline-flex; }
    .nav-links { 
        position: fixed; top: var(--nav-height); right: -100%; 
        height: calc(100vh - var(--nav-height)); width: 80%; 
        background: var(--primary); flex-direction: column; 
        transition: 0.5s; box-shadow: -10px 0 30px rgba(0,0,0,0.3);
        padding: 40px 30px;
        align-items: flex-start;
        z-index: 1200;
    }
    .nav-links.active { right: 0; }
    .nav-links li { width: 100%; margin-bottom: 20px; }
    .nav-links a { display: block; padding: 10px 0; }
    
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .hero-content { border-left: none; padding-left: 0; text-align: center; }
    .hero-btns { flex-direction: column; gap: 15px; justify-content: center; }
    .btn-outline { margin-left: 0; }
    .scroll-indicator { display: none; }
    
    .section-padding { padding: 80px 0 60px 0; }
    .section-title { font-size: 2.2rem; }
    .values-grid { flex-direction: column; gap: 40px; }
    .services-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
    .whatsapp-btn { bottom: 20px; right: 20px; width: 55px; height: 55px; }
    .whatsapp-icon { width: 32px; height: 32px; }
}

@media (max-width: 576px) {
    .container { padding: 0 20px; }
    .hero h1 { font-size: 2rem; }
    .section-title { font-size: 1.8rem; }
    .contact-card, .form-card { padding: 30px 20px; }
}
