/* 
* Vigilox Landing Page Styles
* Mobile-first responsive design
* Main colors: #004472 (blue), #27AE60 (green), neutral grays
* Font: Inter (sans-serif)
*/

:root {
    /* Colors */
    --primary-blue: #004472;
    --primary-green: #27AE60;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    
    /* Font sizes - using rem for accessibility */
    --fs-xs: 0.75rem;    /* 12px */
    --fs-sm: 0.875rem;   /* 14px */
    --fs-base: 1rem;     /* 16px */
    --fs-md: 1.125rem;   /* 18px */
    --fs-lg: 1.25rem;    /* 20px */
    --fs-xl: 1.5rem;     /* 24px */
    --fs-2xl: 1.875rem;  /* 30px */
    --fs-3xl: 2.25rem;   /* 36px */
    --fs-4xl: 3rem;      /* 48px */
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Container width */
    --container-width: 1200px;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* For fixed header and anchor links */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: var(--fs-base);
    line-height: 1.5;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}

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

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

a:hover {
    color: var(--primary-green);
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 30px;
}

/* Section styles */
.section {
    padding: var(--space-2xl) 0;
}

.section__title {
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: var(--space-xl);
    position: relative;
}

.section__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-green);
    margin: var(--space-sm) auto 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: var(--fs-base);
    min-height: 44px; /* Touch target size */
}

.btn--primary {
    background-color: var(--primary-green);
    color: var(--white);
    border: 2px solid var(--primary-green);
}

.btn--primary:hover {
    background-color: transparent;
    color: var(--primary-green);
}

.btn--secondary {
    background-color: var(--primary-blue);
    color: var(--white);
    border: 2px solid var(--primary-blue);
}

.btn--secondary:hover {
    background-color: transparent;
    color: var(--primary-blue);
}

.btn--small {
    padding: 0.5rem 1rem;
    font-size: var(--fs-sm);
}

.btn--full {
    width: 100%;
}

/* Header styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
}

.header__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1140px;
    margin: 0 auto;
    padding: 10px 30px;
}

.logo {
    display: flex;
    align-items: center;
    max-width: 200px;
    padding: 8px 0;
}

.logo img {
    max-height: 130px;
    width: auto;
    object-fit: contain;
    padding: 0;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
}

.nav__toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 25px;
    position: relative;
    z-index: 1010;
}

.nav__container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.nav__toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-blue);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--white);
    padding: 8rem var(--space-lg) var(--space-lg);
    transition: right 0.3s ease;
    z-index: 1005;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

@media (min-width: 1025px) {
    .nav__menu {
        position: static;
        display: flex;
        align-items: center;
        gap: 40px;
        height: auto;
        padding: 0;
        background: none;
        box-shadow: none;
        justify-content: space-between;
        width: auto;
        margin-right: 20px;
    }
    
    .nav__menu a {
        font-size: 14px;
        color: var(--dark-gray);
        padding: 5px 0;
        white-space: nowrap;
        display: inline-block;
    }
    
        .nav__menu a:hover {
        color: var(--primary-green);
    }
    
    .nav__menu li:last-child a {
        background-color: var(--primary-green);
        color: white;
        padding: 8px 15px;
        border-radius: var(--radius-md);
    }
    
    .nav__menu li:last-child a:hover {
        background-color: #229954;
    }
}

.nav__menu.active {
    right: 0;
}

.nav__menu li {
    margin-bottom: var(--space-md);
}

.nav__menu a {
    display: block;
    color: var(--dark-gray);
    font-weight: 500;
    font-size: var(--fs-lg);
    padding: var(--space-xs) 0;
}

.nav__menu a:hover {
    color: var(--primary-green);
}

/* Hero section */
.hero {
    position: relative;
    padding-top: 140px; /* Adjusted for refined header */
    min-height: 75vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__content {
    position: relative;
    z-index: 2;
    padding: var(--space-2xl) 0;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    max-width: 700px;
}

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

.hero__img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 68, 114, 0.8), rgba(0, 68, 114, 0.6));
    z-index: 1;
}

.hero__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: var(--fs-2xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.hero__subtitle {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-xl);
}

/* Beneficios section */
.beneficios__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.beneficio {
    text-align: center;
    padding: var(--space-lg);
    background-color: var(--light-gray);
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.beneficio__icon {
    margin-bottom: var(--space-md);
}

.beneficio h3 {
    color: var(--primary-blue);
    margin-bottom: var(--space-sm);
}

/* Servicios section */
.servicios__subtitle {
    text-align: center;
    font-size: var(--fs-lg);
    margin-bottom: var(--space-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.servicios__subtitle-secondary {
    font-size: var(--fs-xl);
    color: var(--primary-blue);
    margin: var(--space-2xl) 0 var(--space-lg);
    text-align: center;
}

/* Servicios destacados */
.servicios__destacados {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.servicio__destacado {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto var(--space-xl);
}

.servicio__destacado-icon {
    background-color: var(--primary-blue);
    padding: var(--space-lg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.servicio__destacado-icon img {
    filter: brightness(0) invert(1);
}

.servicio__destacado-img {
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background-color: var(--light-gray);
    text-align: center;
    max-height: 320px;
}

.servicio__destacado-img img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

.servicio__destacado-content {
    padding: var(--space-xl);
}

.servicio__destacado-content h3 {
    font-size: var(--fs-xl);
    color: var(--primary-blue);
    margin-bottom: var(--space-lg);
}

.servicio__lista {
    list-style: none;
    margin-bottom: var(--space-lg);
}

.servicio__lista li {
    padding: var(--space-sm) 0;
    position: relative;
    padding-left: 28px;
    margin-bottom: var(--space-sm);
}

.servicio__lista li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

/* Servicios grid secundarios */
.servicios__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.servicio {
    padding: var(--space-lg);
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    background-color: white;
    height: 100%;
}

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

.servicio__icon {
    margin-bottom: var(--space-md);
}

.servicio h3 {
    color: var(--primary-blue);
    margin-bottom: var(--space-sm);
}

/* Certificaciones y carrusel */
.certificaciones {
    background-color: var(--light-gray);
}

.carousel-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    position: relative;
}

.carousel-slide {
    flex: 0 0 100%;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.certificacion {
    background-color: white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.certificacion__img {
    margin-bottom: var(--space-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 180px;
}

.certificacion__img img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.certificacion h3 {
    color: var(--primary-blue);
    margin-bottom: var(--space-md);
    font-size: var(--fs-xl);
    font-weight: 700;
}

.certificacion p {
    font-size: var(--fs-md);
    line-height: 1.6;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.carousel-btn {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.carousel-btn:hover {
    background-color: var(--primary-green);
    transform: scale(1.1);
}

.carousel-prev {
    margin-right: var(--space-md);
}

.carousel-next {
    margin-left: var(--space-md);
}

.carousel-nav {
    display: flex;
    justify-content: center;
    margin-top: var(--space-xl);
    gap: var(--space-sm);
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    border: none;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: var(--primary-green);
    transform: scale(1.2);
}

/* Proceso section */
.proceso__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.proceso__item {
    position: relative;
    padding: var(--space-lg);
    background-color: var(--light-gray);
    border-radius: var(--radius-md);
    text-align: center;
}

.proceso__numero {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    font-size: var(--fs-xl);
    font-weight: 700;
    margin: 0 auto var(--space-md);
}

.proceso__item h3 {
    color: var(--primary-blue);
    margin-bottom: var(--space-sm);
}

/* Casos de éxito section */
.casos__slider {
    position: relative;
    overflow: hidden;
}

.casos__track {
    display: flex;
    transition: transform 0.5s ease;
}

.caso {
    flex: 0 0 100%;
    padding: var(--space-md);
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.caso:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.caso__img {
    margin-bottom: var(--space-md);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eaeaea;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f8f8, #ffffff);
}

.caso__img img {
    width: auto;
    max-width: 90%;
    max-height: 280px;
    object-fit: contain;
    transition: transform 0.5s ease;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.caso:hover .caso__img img {
    transform: scale(1.05);
}

.caso h3 {
    color: var(--primary-blue);
    margin-bottom: var(--space-sm);
    font-size: 1.3rem;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-green);
    padding-bottom: 8px;
    display: inline-block;
}

.casos__nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--space-lg);
}

.casos__prev,
.casos__next {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    background-color: var(--light-gray);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.casos__prev:hover,
.casos__next:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

.casos__prev:before {
    content: '←';
}

.casos__next:before {
    content: '→';
}

.casos__dots {
    display: flex;
    justify-content: center;
    margin: 0 var(--space-md);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--light-gray);
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--primary-blue);
}

/* Por qué elegirnos section */
.porque__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.porque__item {
    display: flex;
    align-items: flex-start;
    padding: var(--space-md);
    background-color: var(--light-gray);
    border-radius: var(--radius-md);
}

.porque__item img {
    margin-right: var(--space-md);
    flex-shrink: 0;
}

/* Contacto section */
.contacto {
    background-color: var(--light-gray);
}

.contacto__subtitle {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.contacto__form {
    max-width: 600px;
    margin: 0 auto;
}

.form__field {
    margin-bottom: var(--space-lg);
}

.form__field--full {
    grid-column: 1 / -1;
}

.form__field label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.form__field input,
.form__field textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-size: var(--fs-base);
    transition: border-color 0.3s ease;
}

.form__field input:focus,
.form__field textarea:focus {
    border-color: var(--primary-blue);
    outline: none;
}

.form__submit {
    text-align: center;
}

.form__honeypot {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* Blog section */
.blog__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.blog__post {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.blog__post:hover {
    transform: translateY(-5px);
}

.blog__img {
    height: 200px;
    overflow: hidden;
}

.blog__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog__post:hover .blog__img img {
    transform: scale(1.05);
}

.blog__content {
    padding: var(--space-lg);
}

.blog__content h3 {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-sm);
    color: var(--primary-blue);
}

.blog__link {
    display: inline-block;
    margin-top: var(--space-md);
    font-weight: 600;
    color: var(--primary-green);
}

.blog__link:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.footer__logo {
    margin-bottom: var(--space-md);
}

.footer__info p {
    margin-bottom: var(--space-md);
}

.footer__contact {
    margin-top: var(--space-lg);
}

.footer__contact p {
    margin-bottom: var(--space-sm);
}

.footer__contact a {
    color: var(--white);
    text-decoration: underline;
}

.footer__contact a:hover {
    color: var(--primary-green);
}

.footer h4 {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-md);
    position: relative;
    padding-bottom: var(--space-xs);
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-green);
}

.footer__links ul,
.footer__legal ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer__links a,
.footer__legal a {
    color: var(--white);
    transition: color 0.3s ease;
}

.footer__links a:hover,
.footer__legal a:hover {
    color: var(--primary-green);
}

.footer__bottom {
    margin-top: var(--space-2xl);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: var(--fs-sm);
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast__content {
    background-color: var(--primary-green);
    color: var(--white);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.toast__message {
    margin-right: var(--space-md);
}

.toast__close {
    background: none;
    border: none;
    color: var(--white);
    font-size: var(--fs-xl);
    cursor: pointer;
    line-height: 1;
}

/* Media Queries */
@media (min-width: 641px) {
    .section__title {
        font-size: var(--fs-3xl);
    }
    
    .hero h1 {
        font-size: var(--fs-3xl);
    }
    
    .hero__subtitle {
        font-size: var(--fs-xl);
    }
    
    .beneficios__grid,
    .servicios__grid,
    .porque__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contacto__form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .form__field--full {
        grid-column: span 2;
    }
    
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .section {
        padding: var(--space-3xl) 0;
    }
    
    .nav__toggle {
        display: none;
    }
    
    .nav__menu {
        position: static;
        display: flex;
        width: auto;
        height: auto;
        padding: 0;
        background: none;
        box-shadow: none;
        overflow: visible;
    }
    
    .nav__menu li {
        margin: 0 0 0 var(--space-lg);
    }
    
    .nav__menu a {
        font-size: var(--fs-base);
    }
    
    .hero h1 {
        font-size: var(--fs-4xl);
    }
    
    .beneficios__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .servicios__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .proceso__grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .porque__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blog__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* Accessibility - Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
