/* =========================================
   VARIABLES GLOBALES
   ========================================= */
:root {
    --primary: #0B2A3F;
    --accent: #4FA1D8;
    --light: #F8FAFC;
    --white: #ffffff;
    --text-dark: #333333;
    --text-gray: #666666;
}

/* =========================================
   RESET Y BASE
   ========================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--light);
    color: var(--primary);
    overflow-x: hidden;
}

h1, .font-serif {
    font-family: 'Playfair Display', serif;
}

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

/* Clase utilitaria: oculta visualmente pero accesible para lectores de pantalla */
.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;
}

/* =========================================
   NAVEGACIÓN
   ========================================= */
nav {
    background: rgba(11, 42, 63, 0.98);
    padding: 20px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 2px;
    text-decoration: none;
}

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

.nav-links {
    display: flex;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    margin-left: 30px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active {
    font-weight: 800;
}

/* =========================================
   HERO Y CARRUSEL
   ========================================= */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 10%;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(45deg, rgba(11, 42, 63, 0.9), rgba(11, 42, 63, 0.4));
    z-index: 1;
}

.hero .grid-2 {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 30px;
    font-weight: 300;
}

/* Título y texto del hero en subpáginas */
.hero-title {
    font-size: 3rem;
    color: var(--white);
    font-family: 'Playfair Display', serif;
    line-height: 1.2;
}

.hero-title .accent {
    color: var(--accent);
}

.hero-text {
    margin: 20px 0;
    line-height: 1.8;
    color: var(--white);
}

/* Carrusel de imágenes de fondo */
.carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}

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

.carousel-bg.bajar {
    background-position: center 35%;
}

.carousel-bg.bajar2 {
    background-position: center 15%;
}

/* =========================================
   BOTONES
   ========================================= */
.btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
    border-radius: 4px;
}

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

.btn-outline {
    display: inline-block;
    padding: 12px 25px;
    border: 2px solid var(--accent);
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: 0.3s;
    text-transform: uppercase;
    border-radius: 4px;
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
}

.btn-outline-white {
    border-color: var(--white);
    color: var(--white);
}

.btn-submit {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    background: var(--accent);
    color: var(--primary);
    text-transform: uppercase;
    font-size: 1.1rem;
    transition: filter 0.3s;
}

.btn-submit:hover {
    filter: brightness(1.1);
}

/* =========================================
   ESTRUCTURAS Y SECCIONES
   ========================================= */
.section-padding {
    padding: 120px 10%;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

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

.bg-primary .section-title h2,
.bg-primary .section-title p {
    color: var(--white);
}

.bg-white {
    background: var(--white);
}

/* Grillas */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* =========================================
   TARJETAS
   ========================================= */

/* Tarjetas de divisiones (index) */
.div-card {
    background: var(--white);
    padding: 50px 30px;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: 0.4s;
    border-top: 5px solid var(--accent);
}

.div-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.div-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.div-card h3 {
    margin-bottom: 15px;
}

.div-card p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

/* Tarjetas de servicios (inmobiliaria) */
.feat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    transition: background 0.3s;
}

.feat-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.feat-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.feat-card h2,
.feat-card h3 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feat-card p {
    color: #ccc;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Tarjetas legales (jurídico) */
.legal-card {
    padding: 25px;
    border-bottom: 1px solid #eee;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
}

.legal-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.legal-card h3 i {
    color: var(--accent);
    margin-right: 10px;
}

.legal-card p {
    color: var(--text-gray);
}

/* =========================================
   ELEMENTOS REUTILIZABLES Y ALERTAS
   ========================================= */
.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: var(--text-gray);
    line-height: 1.6;
}

.info-list i {
    color: var(--accent);
    font-size: 1.2rem;
    margin-top: 4px;
}

.requirement-box {
    background: var(--light);
    border: 1px solid #e1e8ed;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.policy-alert {
    background: rgba(11, 42, 63, 0.03);
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.alert-danger {
    background: #fff3f3;
    border-left: 4px solid #d32f2f;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 4px;
    color: #b71c1c;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Etiquetas (Tags) */
.tag {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-red { background: #fee2e2; color: #dc2626; }
.tag-blue { background: #e0f2fe; color: #0284c7; }
.tag-gray { background: #f3f4f6; color: #4b5563; }

/* =========================================
   ACORDEONES
   ========================================= */
.accordion-container {
    max-width: 900px;
    margin: 0 auto 50px;
}

.category-title {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.category-title i {
    margin-right: 10px;
    color: var(--accent);
}

.accordion-item {
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: #d1e3f0;
}

.accordion-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--white);
    transition: background 0.3s;
    border: none;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.icon-bubble {
    width: 45px;
    height: 45px;
    min-width: 45px;
    background: rgba(79, 161, 216, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    transition: all 0.4s ease;
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.accordion-header i.chevron {
    transition: transform 0.4s;
    font-size: 1rem;
    color: #a0a0a0;
    margin-left: 15px;
}

/* Estado activo del acordeón */
.accordion-item.active {
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(79, 161, 216, 0.15);
}

.accordion-item.active .icon-bubble {
    background: var(--accent);
    color: var(--white);
    transform: scale(1.1);
}

.accordion-item.active .accordion-header {
    border-bottom: 1px solid #f0f0f0;
    background: #fcfdfe;
}

.accordion-item.active i.chevron {
    transform: rotate(180deg);
    color: var(--accent);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease-in-out, padding 0.6s ease;
    background: #fcfdfe;
}

.accordion-item.active .accordion-content {
    max-height: 2500px;
    padding: 30px 25px 35px 88px;
}

.inner-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.inner-content strong {
    color: var(--primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Texto dentro de acordeones */
.accordion-content p {
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 15px;
    margin-top: 0;
}

.accordion-content p:last-child {
    margin-bottom: 0;
}

.accordion-content h4 {
    color: var(--primary);
    margin-bottom: 10px;
    margin-top: 20px;
}

.accordion-content h4:first-child {
    margin-top: 0;
}

/* =========================================
   FORMULARIOS
   ========================================= */
.form-box {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.form-box h4 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.form-box input,
.form-box select,
.form-box textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s;
}

.form-box input:focus,
.form-box select:focus,
.form-box textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-box textarea {
    height: 120px;
    resize: none;
}

.form-box button {
    width: 100%;
}

/* Formulario de contacto en subpáginas */
.contact-form-box {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.contact-form-box h3,
.contact-form-box h4 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.contact-form-box input,
.contact-form-box select,
.contact-form-box textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.contact-form-box select {
    color: var(--text-gray);
    margin-bottom: 20px;
}

.contact-form-box textarea {
    height: 120px;
    resize: none;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

/* =========================================
   SECCIÓN "QUIÉNES SOMOS"
   ========================================= */
.nosotros-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.nosotros-text {
    color: #444;
    line-height: 1.8;
    font-size: 1.1rem;
}

.nosotros-text p {
    margin-bottom: 20px;
}

.nosotros-text p:last-child {
    margin-bottom: 0;
}

/* =========================================
   MAPA
   ========================================= */
.map iframe {
    display: block;
    width: 100%;
    max-width: 600px;
    height: 450px;
    margin: 0 auto;
    border: 2px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(79, 161, 216, 0.15);
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    background: #061824;
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
}

.footer-address {
    color: var(--accent);
    margin-top: 10px;
}

.footer-whatsapp {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-whatsapp a,
.footer-whatsapp a:link,
.footer-whatsapp a:visited {
    color: #25D366;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.footer-whatsapp a:hover {
    color: #128C7E;
}

.footer-whatsapp a i {
    font-size: 1.2rem;
}

/* =========================================
   PÁGINA DE AGRADECIMIENTO
   ========================================= */
.gracias-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--light);
}

.gracias-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    text-align: center;
    max-width: 550px;
    width: 100%;
    border-top: 5px solid var(--accent);
}

.gracias-card i {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 25px;
}

.gracias-card h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.gracias-card p {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.countdown-text {
    font-size: 0.9rem;
    color: #999;
    margin-top: 20px;
    font-style: italic;
}

/* =========================================
   MENÚ HAMBURGUESA Y RESPONSIVE
   ========================================= */
.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
    padding: 0;
}

.menu-toggle:hover {
    color: var(--accent);
}

@media (max-width: 968px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(11, 42, 63, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-links a {
        margin: 15px 0;
        padding: 0;
        font-size: 1.1rem;
        display: block;
        text-align: center;
        width: 100%;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .section-padding {
        padding: 80px 5%;
    }

    .divisions-grid {
        margin-top: 40px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form-box {
        padding: 25px 20px;
    }

    .accordion-item.active .accordion-content {
        padding: 25px 20px;
    }
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        min-height: 70vh;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .carousel-bg.bajar {
        background-position: center 55%;
    }

    .carousel-bg.bajar2 {
        background-position: center 65%;
    }

    .map iframe {
        height: 300px;
    }
}
