/* =========================================
   VARIABLES Y SISTEMA DE DISEÑO
   ========================================= */
:root {
    --primary-blue: #0A2540;
    --primary-blue-dark: #071C33;
    --accent-orange: #ff000c;
    --accent-orange-hover: #cc0009;
    --bg-offwhite: #F8F9FA;
    --white: #FFFFFF;
    --text-dark: #2D3748;
    --text-muted: #718096;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 999px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
}


/* =========================================
   DYNAMIC BACKGROUNDS & GLASSMORPHISM
   ========================================= */
.bg-mesh-dark {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(-45deg, #0A2540, #071C33, rgba(10,37,64,0.95), #0c2b4a);
    background-size: 300% 300%;
    animation: gradientBG 15s ease infinite;
}

.bg-fluid-light {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(120deg, #F8F9FA, #FFFFFF, #f0f4f8);
    background-size: 200% 200%;
    animation: gradientBG 12s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.shape-float {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: floatShape 20s infinite alternate ease-in-out;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatShape {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10vw, -15vh) scale(1.2); }
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(10, 37, 64, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 37, 64, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.grid-pattern-light {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 8px 32px rgba(10, 37, 64, 0.04) !important;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal) !important;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 16px 48px rgba(10, 37, 64, 0.1) !important;
    transform: translateY(-8px) scale(1.02) !important;
}

.dark-mode-text {
    color: var(--white) !important;
}

.dark-mode-text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* =========================================
   RESET Y ESTILOS GLOBALES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-offwhite);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
    box-sizing: border-box;
}

/* =========================================
   BOTONES
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.btn-sm {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(255, 0, 12, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 12, 0.5);
    color: var(--white);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline-white:hover {
    background-color: var(--white);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.btn-outline-navy {
    background-color: transparent;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-navy:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 37, 64, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: padding var(--transition-normal);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-sh {
    background-color: var(--white);
    color: var(--primary-blue);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-cta {
    padding: 8px 20px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for fixed navbar */
    color: var(--white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    transform: scale(1.05); /* Slight zoom for image */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.85) 0%, rgba(10, 37, 64, 0.4) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    text-align: left;
    margin: 0 auto;
}

.badge-promo {
    display: inline-block;
    background-color: var(--accent-orange);
    color: var(--white);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    animation: pulse 2s infinite;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.trust-indicators {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 12, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 0, 12, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 12, 0); }
}

/* =========================================
   SECCIONES GENERALES
   ========================================= */
section {
    padding: clamp(60px, 8vw, 120px) 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.light-text h2, 
.light-text p {
    color: var(--white);
}
.light-text p {
    opacity: 0.8;
}

/* =========================================
   CATÁLOGO DE CASAS (CARDS)
   ========================================= */
.catalogo {
    background-color: var(--white);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 32px;
}

.card-casa {
    background-color: var(--bg-offwhite);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card-casa:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-casa img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-bottom: 4px solid var(--accent-orange);
}

.card-casa-content {
    padding: 32px 24px;
}

.card-casa-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.card-casa-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.link-action {
    color: var(--accent-orange);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-action:hover {
    color: var(--accent-orange-hover);
    gap: 12px; /* Slight horizontal move indicator */
}

/* =========================================
   PROCESOS / PASOS
   ========================================= */
.procesos {
    background-color: var(--bg-offwhite);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.step {
    background-color: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    border-top: 4px solid var(--primary-blue);
    transition: transform var(--transition-fast);
}

.step:hover {
    transform: translateY(-5px);
}

.step-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-blue);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -60px auto 24px auto; /* Overlapping top edge */
    border: 4px solid var(--white);
}

.step h4 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.step p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   SUCURSALES (CARDS LIGHT + SWIPE)
   ========================================= */
.sucursales {
    position: relative;
    padding: 100px 0;
    background-color: #F8F9FA;
    overflow: hidden;
}

.sucursales-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle at top right, rgba(255, 0, 12, 0.06) 0%, transparent 50%),
                      radial-gradient(circle at bottom left, rgba(10, 37, 64, 0.04) 0%, transparent 50%);
    z-index: 1;
}

.sucursales .container {
    position: relative;
    z-index: 2;
}

.sucursales-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 24px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}

.sucursales-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.sucursal-card.glass {
    flex: 0 0 320px;
    scroll-snap-align: center;
    background: var(--white);
    border: none;
    border-top: 4px solid var(--accent-orange);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.sucursal-card.glass:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.sucursal-info h3 {
    color: var(--primary-blue);
    font-size: 1.3rem;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 12px;
}

.sucursal-info .address, .sucursal-info .hours {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-muted);
    opacity: 1;
}

.sucursal-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sucursal-actions a {
    flex: 1;
    text-align: center;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background-color: var(--primary-blue-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.logo-footer {
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand p {
    font-size: 0.9rem;
}

.footer h4 {
    color: var(--white);
    font-family: var(--font-heading);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--accent-orange);
    padding-left: 4px;
}

.footer-contact p {
    margin-bottom: 12px;
}

.socials {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.socials a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
}

.socials a:hover {
    background-color: var(--accent-orange);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .trust-indicators {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    /* Navbar Mobile */
    .nav-links {
        display: none; /* Hide fully for visual simplicity, normally toggle class */
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero {
        align-items: flex-start;
        padding-top: 120px;
    }
    
    .trust-item {
        justify-content: center;
        width: 100%;
    }

    .sucursales-slider {
        padding-left: 5%; /* Align start with container */
    }
}
