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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Styles */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-title {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "left center right";
    gap: 8px;
    align-items: center;
    font-weight: bold;
    font-size: 1.2em;
    color: #1e40af;
}

.title-left {
    grid-area: left;
    font-size: 0.9em;
}

.title-center {
    grid-area: center;
    font-size: 1.3em;
    text-align: center;
}

.title-right {
    grid-area: right;
    font-size: 0.9em;
}

.nav-title-mobile {
    display: none;
}

.desktop-nav {
    display: flex;
    gap: 30px;
}

.desktop-nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.desktop-nav a:hover {
    color: #1e40af;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #1e40af;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

.mobile-nav {
    display: none;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 70px;
    right: -300px;
    width: 300px;
    height: calc(100vh - 70px);
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
}

.sidebar.active {
    right: 0;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 30px 20px;
}

.sidebar-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    transition: color 0.3s ease;
}

.sidebar-links a:hover {
    color: #1e40af;
}

.sidebar-footer {
    display: flex;
    justify-content: center;
    padding-top: 20px;
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(30, 64, 175, 0.7), rgba(8, 145, 178, 0.7)),
        url('img/IMG_20250916_194321.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.hero h4 {
    font-size: 1.3em;
    line-height: 1.8;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Sobre Nosotros Section */
.sobre-nosotros {
    padding: 100px 0;
    background: #f8fafc;
}

.sobre-nosotros h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 60px;
    color: #1e40af;
}

.sobre-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.sobre-text p {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.8;
    color: #4a5568;
    text-align: justify;
}

.sobre-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.sobre-image img:hover {
    transform: scale(1.02);
}

/* Institucional Section */
.institucional {
    padding: 100px 0;
    background: white;
}

.institucional h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 60px;
    color: #1e40af;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

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

.card-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #1e40af;
}

.card p {
    color: #4a5568;
    line-height: 1.7;
}

/* Contacto Section */
.contacto {
    padding: 100px 0;
    background: #f8fafc;
}

.contacto h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 60px;
    color: #1e40af;
}

.contacto-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
}

.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.info-item:hover {
    transform: translateX(5px);
}

.info-icon {
    font-size: 2em;
    width: 60px;
    text-align: center;
}

.info-text h4 {
    margin-bottom: 5px;
    color: #1e40af;
    font-size: 1.2em;
}

.info-text p {
    color: #4a5568;
    margin: 2px 0;
}

.contacto-map {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contacto-map iframe {
    border-radius: 15px;
}

/* Footer */
.footer {
    background: #1e40af;
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-left {
        display: none;
    }

    .nav-title-mobile {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "left center right";
        gap: 8px;
        align-items: center;
        font-weight: bold;
        font-size: 1.1em;
        color: #1e40af;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .hamburger {
        display: flex;
    }

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

    .hero h4 {
        font-size: 1.1em;
    }

    .sobre-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sobre-image {
        order: -1;
    }

    .cards-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .card {
        padding: 30px 20px;
    }

    .contacto-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contacto h2,
    .institucional h2,
    .sobre-nosotros h2 {
        font-size: 2em;
        margin-bottom: 40px;
    }

    .sobre-nosotros,
    .institucional,
    .contacto {
        padding: 60px 0;
    }
}

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

    .hero h1 {
        font-size: 2em;
        letter-spacing: 1px;
    }

    .hero h4 {
        font-size: 1em;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 25px 15px;
    }

    .info-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .contacto h2,
    .institucional h2,
    .sobre-nosotros h2 {
        font-size: 1.8em;
    }
}

.contacto-form {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contacto-form h3 {
    text-align: center;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.contacto-form p {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.btn-enviar {
    display: block;
    width: 100%;
    background: linear-gradient(90deg, #1e40af, #0891b2);
    color: white;
    padding: 0.8rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-enviar:hover {
    opacity: 0.9;
}