/* ==================== VARIABLES ==================== */
:root {
    --primary-color: #1E5A96;      /* Azul principal del logo */
    --primary-dark: #0D3B66;       /* Azul oscuro */
    --secondary-color: #1F1F1F;    /* Negro */
    --accent-color: #2C7AC7;       /* Azul brillante */
    --accent-light: #3A9AE8;       /* Azul claro */
    --text-dark: #1F1F1F;
    --text-light: #6B7280;
    --bg-light: #F8FAFC;
    --bg-blue-light: #E6F2FF;
    --white: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-blue: 0 10px 30px rgba(30, 90, 150, 0.2);
}

/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==================== UTILITIES ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.header-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-light));
    margin: 0 auto 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    min-width: 240px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(30, 90, 150, 0.3);
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 90, 150, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* ==================== NAVIGATION ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13, 59, 102, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(30, 90, 150, 0.3);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(42, 122, 199, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--white);
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-light);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-light);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: all 0.3s ease;
}

/* ==================== HERO SECTION ==================== */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #0D3B66 0%, #1E5A96 50%, #2C7AC7 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(58, 154, 232, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(44, 122, 199, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(30, 90, 150, 0.08) 0%, transparent 50%);
    opacity: 0.6;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(31, 31, 31, 0.3) 100%);
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 900px;
    animation: fadeInUp 1s ease;
    z-index: 5;
    padding-bottom: 6rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    width: 150px;
    height: 150px;
    margin: 0 auto 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(30, 90, 150, 0.4), 
                0 0 40px rgba(58, 154, 232, 0.3);
    animation: float 3s ease-in-out infinite;
    border: 3px solid rgba(58, 154, 232, 0.2);
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: 4px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
    width: 100%;
}

.scroll-indicator {
    position: absolute;
    bottom: 6.5rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    text-align: center;
    color: var(--white);
    animation: bounce 2s infinite;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.scroll-indicator span {
    font-size: 0.75rem;
    letter-spacing: 3px;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(58, 154, 232, 0.5);
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent-light), transparent);
    opacity: 0.8;
}

/* ==================== ABOUT SECTION ==================== */
.about {
    padding: 6rem 0;
    background: var(--white);
}

.about-content {
    margin-bottom: 4rem;
}

.about-main {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 4rem;
}

.about-intro {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.mission-vision {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.mv-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid rgba(30, 90, 150, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.mv-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 60px rgba(30, 90, 150, 0.25);
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 1);
}

.mv-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.mv-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mv-card p {
    color: var(--text-light);
    line-height: 1.8;
}

.why-us {
    background: linear-gradient(135deg, #1E5A96, #2C7AC7);
    padding: 3rem;
    border-radius: 12px;
    color: var(--white);
    box-shadow: var(--shadow-blue);
}

.why-us h3 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.benefit-icon {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ==================== SERVICES SECTION ==================== */
.services {
    padding: 6rem 0;
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

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

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(30, 90, 150, 0.2);
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

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

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(30, 90, 150, 0.2));
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
}

.service-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ==================== GALLERY SECTION ==================== */
.gallery {
    padding: 6rem 0;
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--bg-light);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(31, 31, 31, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay p {
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
}

/* ==================== GALLERY MODAL ==================== */
.gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--white);
    color: var(--white);
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    font-weight: 300;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--white);
    color: var(--white);
    font-size: 3rem;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    font-weight: 300;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.modal-nav:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-50%) scale(1.15);
}

.modal-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.modal-prev {
    left: 2rem;
}

.modal-next {
    right: 2rem;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 2rem;
}

#modalImage {
    max-width: 100%;
    max-height: calc(90vh - 100px);
    object-fit: contain;
    cursor: move;
    transition: transform 0.1s ease;
}

.modal-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    background: var(--primary-color);
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    min-width: 60px;
    height: 60px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.control-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.control-btn:active {
    transform: scale(0.95);
}

.image-counter {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.8rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-width: 100px;
    text-align: center;
}

/* ==================== CONTACT SECTION ==================== */
.contact {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--bg-light), var(--white));
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.info-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.info-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-item p {
    color: var(--text-light);
}

.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(30, 90, 150, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links h4,
.footer-services h4 {
    margin-bottom: 1.5rem;
    color: var(--accent-light);
    font-size: 1.2rem;
}

.footer-links ul li,
.footer-services ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-light);
    padding-left: 10px;
}

.footer-services ul li {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0.5rem 0;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--secondary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .modal-prev {
        left: 1rem;
    }

    .modal-next {
        right: 1rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .services-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
