/* CSS Reset */
body,
h1,
h2,
h3,
p,
ul,
li,
form,
input,
textarea,
button {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: #F5F7FA;
    color: #333;
    overflow-x: hidden;
}

/* Colors */
:root {
    --navy-blue: #024589;
    --vibrant-blue: #FF3040;
    --light-gray: #f1f1f1;
    --white: #FFFFFF;
}

/* General Styles */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.logo {
    color: var(--navy-blue);
    font-size: 1.5em;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 60px;
    width: auto;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 101;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--navy-blue);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li {
    margin: 0;
}

nav a {
    text-decoration: none;
    color: var(--navy-blue);
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1rem;
}

nav a:hover {
    color: var(--vibrant-blue);
}

/* Remove focus outline on click for nav links */
nav a {
    outline: none;
}

nav a:focus {
    outline: none;
}

nav a:focus-visible {
    outline: 2px solid var(--vibrant-blue);
    outline-offset: 4px;
    border-radius: 3px;
}

/* Hero Section */
#hero {
    position: relative;
    overflow: hidden;
    height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 0;
    text-align: center;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1.0;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.7);
}

#hero h1 {
    color: #fdfafa;
    font-size: 2.5em;
    margin-bottom: 20px;
    line-height: 1.2;
}

#hero p {
    font-size: 1.2em;
    color: #fdfafa;
    margin-bottom: 30px;
}

/* Secondary Hero */
#secondary-hero {
    background-color: var(--light-gray);
    padding: 60px 0;
    text-align: center;
}

#secondary-hero h2 {
    color: var(--navy-blue);
    font-size: 2em;
    margin-bottom: 20px;
    line-height: 1.3;
}

#secondary-hero p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.7;
}

.cta-button {
    display: inline-block;
    background-color: var(--vibrant-blue);
    color: var(--white);
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.cta-button:hover {
    background-color: #116799;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* About Us Section */
#about {
    background-color: var(--white);
    padding: 60px 0;
}

#about h2 {
    color: var(--navy-blue);
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}

#about p {
    color: #555;
    font-size: 1.1em;
    line-height: 1.8;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Services Section */
#services {
    background-color: var(--light-gray);
    padding: 60px 0;
}

#services h2 {
    color: var(--navy-blue);
    font-size: 2em;
    margin-bottom: 40px;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    color: var(--navy-blue);
    font-size: 1.4em;
    margin-bottom: 15px;
    line-height: 1.3;
}

.service-card p {
    color: #555;
    line-height: 1.7;
    font-size: 0.95em;
}

.service-card .service-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 5px;
}

/* Why Choose Us Section */
#why-choose-us {
    background-color: var(--white);
    padding: 60px 0;
}

#why-choose-us h2 {
    color: var(--navy-blue);
    font-size: 2em;
    margin-bottom: 40px;
    text-align: center;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.advantage-item {
    text-align: center;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.advantage-item:hover {
    transform: translateY(-5px);
}

.advantage-item i {
    font-size: 3em;
    color: var(--vibrant-blue);
    margin-bottom: 15px;
}

.advantage-item h3 {
    color: var(--navy-blue);
    font-size: 1.2em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.advantage-item p {
    color: #555;
    line-height: 1.6;
    font-size: 0.95em;
}

/* Testimonials Section */
#testimonials {
    background-color: var(--light-gray);
    padding: 60px 0;
}

#testimonials h2 {
    color: var(--navy-blue);
    font-size: 2em;
    margin-bottom: 40px;
    text-align: center;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--white);
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-style: italic;
    color: #555;
    line-height: 1.8;
}


/* Contact Section */
#contact {
    background-color: var(--white);
    padding: 60px 0;
    text-align: center;
}

#contact h2 {
    color: var(--navy-blue);
    font-size: 2em;
    margin-bottom: 40px;
}

/* Footer */
footer {
    background-color: var(--navy-blue);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

footer p {
    margin-bottom: 10px;
    font-size: 0.95em;
}

footer a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--vibrant-blue);
}

/* Accessibility improvements */
input:focus,
textarea:focus,
button:focus {
    outline: 2px solid var(--vibrant-blue);
    outline-offset: 2px;
}

/* ========================================
   RESPONSIVE MEDIA QUERIES
   ======================================== */

/* Tablets and Small Laptops (769px - 1024px) */
@media (max-width: 1024px) {
    .container {
        width: 92%;
    }

    #hero {
        height: 500px;
    }

    #hero h1 {
        font-size: 2.2em;
    }

    #secondary-hero h2 {
        font-size: 1.8em;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }

    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets (481px - 768px) */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }

    /* Header adjustments */
    header .container {
        padding: 10px 15px;
    }

    .logo-img {
        height: 50px;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.active {
        max-height: 400px;
    }

    nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }

    nav ul li {
        margin: 0;
        padding: 12px 0;
        border-bottom: 1px solid #eee;
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav a {
        display: block;
        font-size: 1.1rem;
        padding: 5px 0;
    }

    /* Hero Section */
    #hero {
        height: 450px;
    }

    #hero h1 {
        font-size: 1.8em;
        padding: 0 15px;
    }

    #hero p {
        font-size: 1em;
        padding: 0 15px;
    }

    /* Secondary Hero */
    #secondary-hero {
        padding: 50px 0;
    }

    #secondary-hero h2 {
        font-size: 1.6em;
    }

    #secondary-hero p {
        font-size: 1em;
    }

    .cta-button {
        padding: 12px 28px;
        font-size: 0.95rem;
    }

    /* About Section */
    #about {
        padding: 50px 0;
    }

    #about h2 {
        font-size: 1.7em;
    }

    #about p {
        font-size: 1em;
    }

    /* Services */
    #services {
        padding: 50px 0;
    }

    #services h2 {
        font-size: 1.7em;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .service-card {
        padding: 25px;
    }

    .service-card h3 {
        font-size: 1.3em;
    }

    /* Advantages */
    #why-choose-us {
        padding: 50px 0;
    }

    #why-choose-us h2 {
        font-size: 1.7em;
    }

    .advantage-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .advantage-item {
        padding: 20px;
    }

    .advantage-item i {
        font-size: 2.5em;
    }

    /* Testimonials */
    #testimonials {
        padding: 50px 0;
    }

    #testimonials h2 {
        font-size: 1.7em;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .testimonial-card {
        padding: 25px;
    }

    /* Contact */
    #contact {
        padding: 50px 0;
    }

    /* Footer */
    footer {
        padding: 25px 0;
    }

    footer p {
        font-size: 0.9em;
    }
}

/* Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 10px;
        max-width: 100%;
    }

    /* Header */
    header .container {
        padding: 10px 10px;
    }

    .logo-img {
        height: 45px;
    }

    /* Hero */
    #hero {
        height: 400px;
    }

    #hero h1 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    #hero p {
        font-size: 0.9em;
        margin-bottom: 20px;
    }

    /* Secondary Hero */
    #secondary-hero {
        padding: 40px 0;
    }

    #secondary-hero h2 {
        font-size: 1.4em;
        margin-bottom: 15px;
    }

    #secondary-hero p {
        font-size: 0.95em;
        margin-bottom: 25px;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    /* Sections */
    #about,
    #services,
    #why-choose-us,
    #testimonials,
    #contact {
        padding: 40px 0;
    }

    h2 {
        font-size: 1.5em !important;
        margin-bottom: 25px !important;
    }

    #about p {
        font-size: 0.95em;
    }

    /* Service Cards */
    .service-card {
        padding: 20px;
    }

    .service-card h3 {
        font-size: 1.2em;
    }

    .service-card p {
        font-size: 0.9em;
    }

    .service-card .service-image {
        max-height: 180px;
    }

    /* Advantages */
    .advantage-item {
        padding: 18px;
    }

    .advantage-item i {
        font-size: 2.2em;
    }

    .advantage-item h3 {
        font-size: 1.1em;
    }

    .advantage-item p {
        font-size: 0.9em;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 20px;
        font-size: 0.9em;
    }

    /* Footer */
    footer p {
        font-size: 0.85em;
        line-height: 1.6;
    }
}

/* Extra Small Devices (max-width: 360px) */
@media (max-width: 360px) {
    #hero {
        height: 350px;
    }

    #hero h1 {
        font-size: 1.3em;
    }

    #secondary-hero h2 {
        font-size: 1.2em;
    }

    .service-card .service-image {
        max-height: 150px;
    }

    .advantage-item i {
        font-size: 2em;
    }
}

/* ========================================
   SMOOTH SCROLL & ACTIVE MENU
   ======================================== */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Active menu link highlight - SOLO PARA MOBILE */
@media (max-width: 768px) {
    nav a.active {
        color: var(--vibrant-blue);
        position: relative;
        padding-left: 10px;
    }

    nav a.active::after {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 70%;
        background-color: var(--vibrant-blue);
        animation: slideInMobile 0.3s ease;
    }

    @keyframes slideInMobile {
        from {
            height: 0;
        }

        to {
            height: 70%;
        }
    }
}

/* Para escritorio: solo cambio de color, SIN borde */
@media (min-width: 769px) {
    nav a.active {
        color: var(--vibrant-blue);
    }
}

/* Ensure sections have proper spacing for scroll */
section {
    scroll-margin-top: 80px;
}