﻿/* Variables de diseño - :root permite acceso global */
:root {
    /* Colores principales */
    --primary-color: #2c3e50; /* Azul oscuro principal */
    --secondary-color: #3498db; /* Azul brillante */
    --accent-color: #e74c3c; /* Rojo coral para acentos */
    --success-color: #27ae60; /* Verde para acciones positivas */
    /* Escala de grises */
    --light-bg: #f8f9fa; /* Fondo claro */
    --light-text: #ecf0f1; /* Texto sobre fondos oscuros */
    --dark-text: #2c3e50; /* Texto principal */
    --border-color: #dfe6e9; /* Bordes sutiles */
    /* Tipografía */
    --font-main: 'Open Sans', sans-serif;
    --font-headings: 'Montserrat', sans-serif;
    /* Espaciado */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    /* Bordes */
    --border-radius: 8px;
    --border-radius-sm: 4px;
    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset básico para consistencia */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Tipografía base */
body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

    a:hover {
        color: var(--primary-color);
    }

/* Contenedores principales */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Estilos para el Banner Corporativo */
.corporate-banner {
    /* Bajamos el mínimo a 0 para quitar cualquier restricción */
    min-height: 0 !important;
    /* Le damos un alto “fijo” aproximado */
    height: 150px !important;
    /* Reducimos el padding vertical para que no añada espacio extra */
    padding-top: 0.9rem !important;
    padding-bottom: 0.2rem !important;
    position: relative;
    width: 100%;
    min-height: 150px; /* ← antes 500px, ahora menos alto */
    background-size: cover;
    background-position: center;
    color: white;
    padding: 3rem 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.banner-dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(21, 86, 116, 1);
}

.banner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.corporate-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    text-align: left; /* ← alineación a la izquierda */
    white-space: nowrap; /* ← una sola línea */
}

.corporate-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
    text-align: left; /* ← alineación a la izquierda */
}

.corporate-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
    margin: 1.5rem 0;
    border-radius: 2px;
}

.corporate-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
    max-width: 500px;
    text-align: left; /* ← alineación a la izquierda */
    white-space: nowrap; /* ← una sola línea */
}

.condominio-image {
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Estilos para el contenido principal */

.main-content-section {
    background: #fff;
    padding: var(--space-lg) 0;
}

/* Fuerza un solo renglón y centra verticalmente */
.welcome-container {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: nowrap; /* evita que el logo «caiga» debajo */
}

/* El texto ocupa todo el espacio restante */
.text-content {
    flex: 1;
}

/* Contenedor del logo ajustado al contenido */
.logo-empresarial-container {
    flex: 0 0 auto;
}

/* Tamaño del logo */
.logo-empresarial {
    max-height: 230px; /* ajusta este valor */
    width: auto;
    display: block;
}

.text-content h1 {
    font-family: var(--font-headings);
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.text-content p {
    line-height: 1.6;
    text-align: justify;
}

/* Animaciones */
@@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@@media (max-width: 992px) {
    .banner-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .company-logos {
        justify-content: center;
    }

    .corporate-divider {
        margin-left: auto;
        margin-right: auto;
    }

    .corporate-description {
        margin-left: auto;
        margin-right: auto;
    }

    .banner-visual {
        margin-top: 3rem;
    }

    .corporate-title {
        font-size: 2.2rem;
    }

    .corporate-subtitle {
        font-size: 1.4rem;
    }
}

/* ---- Layout general ---- */
.top-section {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: var(--space-lg);
    padding: var(--space-lg);
}

/* Banner “corporativo” */
.corporate-banner {
    position: relative;
    background: url('../images/banner-bg.jpg') center/cover no‑repeat;
    height: 300px;
}

.banner-dark-overlay {
    position: absolute;
    inset: 0;
    background: rgb(71, 101, 175); /* rgb(0,31,63) es un azul casi negro */
}

/* Contenido interno del banner */
.banner-grid {
    position: relative; /* para superponer el overlay */
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    height: 100%;
}

.banner-branding .banner-taglines h1 {
    font-family: var(--font-headings);
    font-size: 2rem;
    color: var(--light-text);
}

.banner-branding .banner-taglines h2 {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    color: var(--light-text);
}

.banner-branding .banner-taglines .corporate-divider {
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    margin: var(--space-sm) 0;
}

.banner-branding .banner-taglines p {
    color: var(--light-text);
    line-height: 1.5;
}

.banner-taglines h1,
.banner-taglines h2,
.banner-taglines p {
    color: var(--light-text);
}


/* Menú lateral */
.menu-container {
    flex: 0 0 20%;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: center;
}
    .menu-list li + li {
        margin-top: var(--space-xs);
    }

    .menu-list li {
        margin: var(--space-xs) 0;
    }

        /* Aplica a todos los enlaces del menú lateral */
        .menu-list li a {
            display: inline-block; /* o block, según prefieras */
            width: 300px; /* ajusta este valor al ancho deseado */
            padding: 8px 12px; /* opcional: control de espaciado interno */
            box-sizing: border-box; /* para que el padding no sume al ancho total */
            text-align: left; /* si quieres centrar o alinear el texto */
            white-space: nowrap; /* evita que el texto haga wrap */
            overflow: hidden; /* recorta texto si es demasiado largo */
            text-overflow: ellipsis; /* añade “…” si falta espacio */
        }

        .menu-list a:hover,
        .menu-list a.active {
            background: var(--secondary-color);
            color: #fff;
        }

            .menu-list li a .menu-icon {
                width: 24px;
                height: auto;
                margin-right: var(--space-xs);
            }

.menu-icon {
    width: 24px;
    height: auto;
}

/* Carrusel central */
.carousel-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auto-carousel,
.carousel-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

    .carousel-item.active {
        opacity: 1;
        z-index: 1;
    }

    .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* Panel lateral derecho */
.image-panel {
    flex: 0 0 20%;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.responsive-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Sección de características */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin: var(--space-xl) var(--space-md);
}

.feature-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: justify;
}

    .feature-card h3 {
        margin-bottom: var(--space-md);
        font-size: 1.25rem;
        color: var(--secondary-color);
    }

    .feature-card img {
        width: 100%;
        max-height: 150px;
        object-fit: contain;
        margin-bottom: var(--space-md);
    }

    .feature-card p {
        color: #555;
        font-size: 1rem;
    }

/* Ajuste para móviles */
@media (max-width: 992px) {
    .top-section {
        flex-direction: column;
        gap: var(--space-md);
    }

    .menu-container,
    .image-panel {
        width: 100%;
        flex: none;
        height: auto;
    }

    .carousel-container {
        width: 100%;
        min-height: 200px;
    }

    .features {
        grid-template-columns: 1fr 1fr;
    }
}


/* ==================== */
/* COMPONENTE: HEADER */
/* ==================== */
.main-header {
    position: relative;
    z-index: 1000;
}

.top-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a1a2e 100%);
    padding: var(--space-sm) 0;
    box-shadow: var(--shadow-md);
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company-logo {
    height: 50px;
    width: auto;
}

/* ==================== */
/* COMPONENTE: CARRUSEL */
/* ==================== */
.carousel-container {
    height: 650px; /* altura total del marco del carrusel */
}

.auto-carousel {
    height: 100%; /* que ocupe todo el contenedor padre */
}

.carousel-inner,
.carousel-item {
    height: 100%; /* que cada slide cubra esa altura */
}

    .carousel-item img {
        width: 100%; /* ancho completo */
        height: 100%; /* alto completo */
        object-fit: cover; /* centra y recorta proporcionalmente */
    }

/* ==================== */
/* COMPONENTE: NAVEGACIÓN */
/* ==================== */
.main-navigation {
    background: var(--light-bg);
    padding: var(--space-sm) 0;
    box-shadow: var(--shadow-sm);
}

.menu-list {
    display: flex;
    flex-direction: column; /* o “row” si quieres horizontal */
    list-style: none;
    margin: 0;
    padding: 0;
}

    .menu-list li {
        position: relative;
    }

    .menu-list a {
        display: flex;
        align-items: center;
        gap: var(--space-xs);
        padding: var(--space-md) var(--space-lg);
        color: var(--dark-text);
        font-weight: 500;
        transition: all var(--transition-normal);
    }

        .menu-list a:hover,
        .menu-list a:focus,
        .menu-list a.active {
            color: var(--secondary-color);
            background-color: rgba(var(--secondary-color), 0.05);
        }

        .menu-list a.active {
            font-weight: 600;
        }

.menu-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ==================== */
/* COMPONENTE: MENÚ LATERAL */
/* ==================== */
.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .menu-list li {
        margin: 0.5rem 0;
    }

        .menu-list li a {
            display: flex;
            align-items: center;
            padding: 0.75rem 1rem;
            color: #155674;
            text-decoration: none;
            font-weight: 600;
            text-transform: uppercase;
            border: 2px solid rgba(255,255,255,0.8);
            border-radius: 0.5rem;
            background: rgba(255,255,255,0.05);
            box-shadow: 0 2px 6px rgba(0,0,0,0.4), 0 0 6px rgba(255,255,255,0.4);
            transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
        }

            /* Separación entre icono y texto */
            .menu-list li a .menu-icon {
                margin-right: 0.75rem;
                width: 24px;
                height: auto;
                /* opcional: un ligero brillo en el icono */
                filter: drop-shadow(0 0 4px rgba(255,255,255,0.6));
            }

            .menu-list li a:hover,
            .menu-list li a:focus {
                background: rgba(255,255,255,0.15);
                box-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 0 10px rgba(255,255,255,0.8);
                transform: translateX(4px);
            }

/* ==================== */
/* COMPONENTE: FOOTER */
/* ==================== */
.site-footer {
    background-color: #0d1218; /* color de fondo oscuro */
    color: #fff; /* texto blanco */
    padding: 2rem 0; /* espacio arriba y abajo */
    text-align: center; /* centramos el texto */
    font-size: 0.9rem; /* tamaño un poco más compacto */
}

    .site-footer .container p {
        margin: 0.2rem 0; /* pequeño espacio entre líneas */
    }

/* ==================== */
/* BOTÓN HAMBURGUESA */
/* ==================== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    z-index: 1001;
}

.hamburger-box {
    width: 24px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    width: 100%;
    height: 2px;
    background-color: var(--light-text);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color var(--transition-fast);
}

    .hamburger-inner::before,
    .hamburger-inner::after {
        content: "";
        width: 100%;
        height: 2px;
        background-color: var(--light-text);
        position: absolute;
        left: 0;
        transition: transform var(--transition-normal);
    }

    .hamburger-inner::before {
        top: -6px;
    }

    .hamburger-inner::after {
        bottom: -6px;
    }

/* Estado abierto del menú */
.mobile-menu-toggle[aria-expanded="true"] .hamburger-inner {
    background-color: transparent;
}

    .mobile-menu-toggle[aria-expanded="true"] .hamburger-inner::before {
        transform: translateY(6px) rotate(45deg);
    }

    .mobile-menu-toggle[aria-expanded="true"] .hamburger-inner::after {
        transform: translateY(-6px) rotate(-45deg);
    }

/* ==================== */
/* VERSIÓN MÓVIL */
/* ==================== */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-normal);
        box-shadow: var(--shadow-md);
    }

        .main-navigation[aria-expanded="true"] {
            max-height: 500px;
        }

    .menu-list {
        flex-direction: column;
        align-items: stretch;
    }

        .menu-list a {
            padding: var(--space-sm) var(--space-md);
            border-bottom: 1px solid var(--border-color);
        }
}
