/* Variables CSS para el color principal */
:root {
    --primary-color: #839996;
    --primary-dark: #839996;
    --primary-light: #839996;
    --primary-lighter: #f0f4f3;
    --text-dark: #2c3e50;
    --text-muted: #839996;
}

/* Estilos generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    padding-top: 100px;
}

/* Header personalizado con transiciones suaves */
.header-custom {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 80px;
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Estado contraído del header al hacer scroll */
.header-custom.scrolled {
    min-height: 60px;
    padding: 8px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Logo centrado con transiciones */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    transition: all 0.3s ease-in-out;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-text {
    color: #333;
    font-size: 2.2rem;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: center;
    transition: font-size 0.3s ease-in-out;
}

/* Logo contraído */
.header-custom.scrolled .logo-text {
    font-size: 1.8rem;
}

/* Logo image con transiciones */
.logo-image {
    width: 180px;
    height: 60px;
    object-fit: contain;
    background-color: transparent;
    padding: 0;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    filter: brightness(1.1) contrast(1.05);
}

/* Logo image contraído */
.header-custom.scrolled .logo-image {
    width: 150px;
    height: 50px;
}

.logo-image:hover {
    transform: scale(1.03);
    filter: brightness(1.2) contrast(1.1);
}

/* Navegación con transiciones */
.nav-link {
    color: #333 !important;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1rem;
}

/* Navegación contraída */
.header-custom.scrolled .nav-link {
    font-size: 0.9rem;
    padding: 6px 12px;
}

.nav-link:hover {
    color: #839996 !important;
    background-color: #f8f9fa;
}

/* Botón hamburguesa con transiciones */
.navbar-toggler {
    border: 1px solid #dee2e6;
    padding: 4px 8px;
    background: transparent;
    border-radius: 6px;
    outline: none;
    box-shadow: none;
    transition: all 0.3s ease;
}

/* Botón hamburguesa contraído */
.header-custom.scrolled .navbar-toggler {
    padding: 3px 6px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(131, 153, 150, 0.25);
}

.navbar-toggler-icon {
    background-image: none;
    width: 25px;
    height: 2px;
    background-color: #333;
    display: block;
    position: relative;
    transition: all 0.3s ease;
}

/* Icono hamburguesa contraído */
.header-custom.scrolled .navbar-toggler-icon {
    width: 20px;
    height: 2px;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Iconos contraídos */
.header-custom.scrolled .navbar-toggler-icon::before,
.header-custom.scrolled .navbar-toggler-icon::after {
    width: 20px;
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    top: 8px;
}

/* Animación del botón hamburguesa */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, white 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.fade-in-text {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.fade-in-text:nth-child(2) {
    animation-delay: 0.3s;
}

.hero-image-container {
    position: relative;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero-image-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: 10px;
    bottom: 10px;
    background: var(--primary-color);
    border-radius: 10px;
    z-index: -1;
}

/* Botones personalizados */
.btn-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-custom:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(131, 153, 150, 0.3);
}

/* Secciones */
.bg-light-custom {
    background-color: var(--primary-lighter);
}

.section-title {
    color: var(--text-dark);
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Tarjetas de características */
.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(131, 153, 150, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 2rem;
}

/* Tarjetas de espacios físicos */
.space-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.space-card:hover {
    transform: translateY(-8px);
}

.space-card img {
    height: 250px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.3s ease;
}

.space-card:hover img {
    transform: scale(1.05);
}

.space-info h5 {
    color: var(--primary-color);
    font-weight: bold;
}

/* Tarjetas de sucursales */
.branch-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.branch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.branch-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.branch-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.branch-info p {
    margin-bottom: 8px;
    color: var(--text-muted);
}

.branch-info i {
    color: var(--primary-color);
    width: 18px;
}

.service-tag {
    display: inline-block;
    background-color: var(--primary-lighter);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 4px;
}

.bg-custom {
    background-color: var(--primary-color) !important;
}

/* Footer */
.footer-custom {
    background-color: var(--primary-dark);
}

.social-links a {
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: white !important;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efectos de scroll suave */
html {
    scroll-behavior: smooth;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding-top: 90px;
    }
    
    .header-custom {
        min-height: 70px;
        padding: 10px 0;
    }
    
    .header-custom.scrolled {
        min-height: 55px;
        padding: 6px 0;
    }
    
    .hero-section {
        min-height: 60vh;
        text-align: center;
        padding-top: 2rem;
    }
    
    .logo-text {
        font-size: 1.8rem;
    }
    
    .header-custom.scrolled .logo-text {
        font-size: 1.5rem;
    }
    
    .logo-image {
        width: 120px;
        height: 42px;
    }
    
    .header-custom.scrolled .logo-image {
        width: 100px;
        height: 35px;
    }
    
    /* Navegación móvil */
    .navbar-collapse {
        background-color: var(--primary-color);
        border-radius: 0 0 10px 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        margin-top: 10px;
        padding: 0 15px 15px 15px;
    }
    
    .navbar-nav .nav-link {
        color: white !important;
        font-size: 1.1rem;
        text-align: left;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(255,255,255,0.1);
        border-radius: 5px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .branch-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 75px;
    }
    
    .header-custom {
        min-height: 65px;
        padding: 8px 0;
    }
    
    .header-custom.scrolled {
        min-height: 50px;
        padding: 4px 0;
    }
    
    .hero-section {
        padding-top: 1.5rem;
    }
    
    .hero-section .display-4 {
        font-size: 1.8rem;
    }
    
    .btn-custom {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
    
    .feature-card,
    .branch-card {
        padding: 20px !important;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .header-custom.scrolled .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-image {
        width: 100px;
        height: 35px;
    }
    
    .header-custom.scrolled .logo-image {
        width: 80px;
        height: 28px;
    }
    
    /* Ajustes específicos para móviles pequeños */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .navbar-collapse {
        margin-top: 5px;
        padding: 0 10px 10px 10px;
    }
    
    .navbar-nav .nav-link {
        font-size: 1rem;
        padding: 8px 0;
    }
}