/* C:\laragon\www\corselca\assets\css\style.css */

:root {
    /* Colores Institucionales Corselca */
    --color-primary: #0047bb;
    --color-primary-rgb: 0, 71, 187;
    --color-secondary: #000064;
    --color-secondary-rgb: 0, 0, 100;
    
    /* Colores Acento */
    --color-red: #c00000;
    --color-yellow: #facc15;
    
    /* Superficies y Textos (Estilo Apple, Clean & Premium) */
    --color-bg: #fbfbfd;
    --color-surface: #ffffff;
    --color-surface-rgb: 255, 255, 255;
    --color-text-main: #1d1d1f;
    --color-text-muted: #86868b;
    --color-border: rgba(0, 0, 0, 0.08);

    /* Tipografía Institucional */
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    /* Utilidades Premium */
    --shadow-sm: 0 4px 14px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px 0 rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px 0 rgba(0,0,0,0.12);
    --shadow-primary: 0 10px 30px rgba(0, 71, 187, 0.2);
    
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* Reset y Lenis Smooth Scroll base */
html.lenis {
    height: auto;
}
.lenis.lenis-smooth {
    scroll-behavior: auto;
}
.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}
.lenis.lenis-stopped {
    overflow: hidden;
}
.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

* {
    box-sizing: border-box;
}

body.custom-cursor-active * {
    cursor: none !important;
}

html {
    /* Removido scroll-padding-top para que no desplace la sección 100vh hacia abajo y cause corte */
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg);
    background-image: url('../img/5179178381260557364.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    position: relative;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Capa semitransparente sobre el body para que el texto sea legible */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(251, 251, 253, 0.85); /* --color-bg con opacidad */
    z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-main);
}

p {
    text-align: justify;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Custom Cursor */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

/* Ocultar en dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .cursor, .cursor-follower {
        display: none !important;
    }
    * {
        cursor: auto !important;
    }
}

.cursor.hover {
    background-color: transparent;
}
.cursor-follower.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(var(--color-primary-rgb), 0.1);
    border-color: rgba(var(--color-primary-rgb), 0);
    backdrop-filter: blur(2px);
}

/* Navbar / Glassmorphism */
.top-bar-logos {
    background-color: var(--color-surface);
    padding: 5px 0;
    border-bottom: 3px solid var(--color-yellow);
    position: relative;
    z-index: 1040;
}
.top-bar-logos::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-red);
}

.logo-min {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.navbar-custom {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1rem 0;
}

.navbar-custom.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.9);
}

.logo-corselca-nav {
    max-height: 45px;
    transition: transform 0.3s ease;
}

.navbar-custom .navbar-nav .nav-link {
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
    margin: 0 0.2rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.navbar-custom .navbar-nav .nav-link:hover,
.navbar-custom .navbar-nav .nav-link.active {
    color: var(--color-white);
    background-color: var(--color-primary);
    box-shadow: var(--shadow-primary);
}

/* Utilidades Comunes y Animaciones Base */
.section-padding {
    height: 100dvh;
    padding: 70px 0 20px 0; /* Padding suficiente para librar el navbar de 70px sin empujar de más */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    background-color: transparent !important;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 3rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100dvh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: transparent;
}

.hero-filial {
    position: relative;
    height: 50dvh;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: transparent;
}

.hero-img-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* Asegura que el centro de la imagen (donde está el logo) se vea */
    opacity: 0.8;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(var(--color-secondary-rgb), 0.2), rgba(var(--color-bg), 1));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem;
    height: 100%;
    padding-top: 100px; /* offset para el navbar */
}

.hero-badge {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-badge p {
    margin: 0;
    color: var(--color-white);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--color-white);
    line-height: 1.1;
    margin-bottom: 2rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Magnetic Button (Custom) */
.btn-magnetic-wrapper {
    display: inline-block;
    padding: 20px; /* Area for magnetism */
}

.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 3rem;
    background-color: var(--color-primary);
    color: var(--color-white) !important;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-primary);
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-premium:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 71, 187, 0.4);
}

.btn-premium:hover::before {
    opacity: 1;
}

/* Filiales Marquee */
.filiales-marquee-section {
    padding: 4rem 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
    position: relative;
}

.filiales-marquee-section::before,
.filiales-marquee-section::after {
    content: "";
    position: absolute;
    top: 0;
    width: 250px;
    height: 100%;
    z-index: 2;
}

.filiales-marquee-section::before {
    left: 0;
    background: linear-gradient(to right, var(--color-surface) 0%, transparent 100%);
}

.filiales-marquee-section::after {
    right: 0;
    background: linear-gradient(to left, var(--color-surface) 0%, transparent 100%);
}

.marquee-container {
    display: flex;
    width: fit-content;
    animation: marquee 30s linear infinite;
}

.marquee-container:hover {
    animation-play-state: paused;
}

.marquee-item {
    padding: 0 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marquee-item img {
    height: 60px;
    filter: grayscale(100%) opacity(0.5);
    transition: all 0.4s ease;
}

.marquee-item img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Quiénes Somos / Swiper */
.about-section {
    position: relative;
    background-color: transparent;
}

.swiper-about {
    width: 100%;
    padding: 50px 0;
}

.swiper-about .swiper-slide {
    width: 80%; /* Para mostrar partes de los slides adyacentes */
    transition: all 0.4s ease;
    opacity: 0.4;
    transform: scale(0.9);
}

.swiper-about .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
}

.about-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    position: relative;
}

@media (min-width: 992px) {
    .about-card {
        flex-direction: row;
        height: 50dvh; /* Ajuste dinámico para no cortar */
        max-height: 450px;
    }
    .about-card-content, .about-card-image {
        flex: 1;
    }
}

.about-card-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.about-card-content h3 {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.about-card-image {
    position: relative;
    overflow: hidden;
}

.about-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 10s ease;
}

.swiper-slide-active .about-card-image img {
    transform: scale(1.1);
}

/* Botones de navegación del Swiper (Premium style) */
.swiper-btn-custom {
    width: 60px;
    height: 60px;
    background: var(--color-surface);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: none !important;
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
}

.swiper-btn-custom:hover {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-primary);
    transform: translateY(-50%) scale(1.1);
}

.swiper-btn-prev { left: 20px; }
.swiper-btn-next { right: 20px; }

/* Servicios */
.services-section {
    position: relative;
    background: transparent;
}

.service-card-premium {
    padding: 2rem; /* Reducido para que quepa en 100vh */
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    height: auto;
    transition: box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card-premium:hover {
    box-shadow: var(--shadow-lg);
}

.service-card-premium:hover::before {
    transform: scaleX(1);
}

.service-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    transition: all 0.4s ease;
}

.service-card-premium:hover .service-icon-box {
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    transform: rotateY(180deg);
}

/* Contacto & Footer */
.contact-section {
    background-color: transparent;
}

.contact-info-glass {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 2rem; /* Reducido para no cortar */
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.contact-item-premium {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem; /* Reducido para no cortar */
}

.contact-item-premium:last-child {
    margin-bottom: 0;
}

.contact-icon-premium {
    width: 50px;
    height: 50px;
    background: var(--color-surface);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 40vh; /* Ajuste dinámico para no cortar */
    max-height: 400px;
    position: relative;
}

.map-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

.footer {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 5rem 0 2rem 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 100%, rgba(0, 71, 187, 0.4) 0%, transparent 50%);
    pointer-events: none;
}

.footer-logo {
    max-height: 50px;
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
}

.social-links-premium a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    margin-right: 15px;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.1);
}

.social-links-premium a[aria-label="Facebook"] {
    color: #1877F2;
}

.social-links-premium a[aria-label="X (Twitter)"] {
    color: #ffffff; /* Blanco para destacar en el fondo oscuro */
}

.social-links-premium a[aria-label="Instagram"] {
    color: #E1306C;
}

.social-links-premium a[aria-label="TikTok"] {
    color: #ff0050; /* Rojo/Rosa característico de TikTok */
}

.social-links-premium a:hover {
    transform: scale(1.2);
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.footer-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 0.8rem;
}

.footer-nav a:hover {
    color: var(--color-white);
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 4rem;
    padding-top: 2rem;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* Animations Utils */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
}
.reveal-text {
    opacity: 0;
}
.hover-scale {
    transition: transform 0.3s ease;
}
.hover-scale:hover {
    transform: scale(1.05);
}

/* Media Queries Responsivos (Mobile Elite) */
@media (max-width: 768px) {
    .section-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    .hero-badge p {
        font-size: 0.75rem;
    }
    .about-card-content {
        padding: 2rem !important; /* Reducir padding enorme en móviles */
    }
    .service-card-premium {
        padding: 1.5rem !important;
    }
    .contact-info-glass {
        padding: 1.5rem !important;
    }
    .section-padding {
        padding: 60px 0 10px 0; /* Un poco menos de padding en móviles */
    }
}
