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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 20px;
    line-height: 1.6;
    color: #333;
    background: #2C5F7C;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    min-height: 80px;
}

.logo {
    max-width: 200px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
    visibility: visible;
}

.logo:hover {
    transform: scale(1.05);
}

.header-text {
    text-align: center;
    flex: 1;
}

/* Si el logo incluye el nombre, ocultar el texto */
header h1 {
    font-size: 1.8em;
    color: #2C5F7C;
    margin-bottom: 5px;
    font-weight: 700;
}

/* Opción para ocultar el texto si el logo ya incluye el nombre */
/* Descomenta las siguientes líneas si quieres ocultar el texto cuando uses el logo completo */
/*
.header-content:has(.logo[src*="logo-completo"]) .header-text {
    display: none;
}
*/

.subtitle {
    color: #666;
    font-size: 0.95em;
}

/* Navigation */
.main-nav {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 8px 0;
}

.nav-wrapper {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: center;
}

.nav-logo-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-logo {
    max-width: 180px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.nav-menu-column {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 5px;
    width: 100%;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: #555;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85em;
    white-space: nowrap;
}

.nav-link:hover {
    background: linear-gradient(135deg, #2C5F7C 0%, #1E4A5F 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(44, 95, 124, 0.3);
}

.nav-link.active {
    background: linear-gradient(135deg, #2C5F7C 0%, #1E4A5F 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(44, 95, 124, 0.3);
}

/* Main Content */
main.container {
    padding: 0 60px;
    margin-top: 50px;
    max-width: 100%;
}

.content-wrapper {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    min-height: 700px;
    margin: 0;
}

#iframe-container {
    width: 100%;
    min-height: 700px;
    height: calc(100vh - 350px);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 30px;
}

#iframe-container iframe {
    width: 100%;
    min-height: 700px;
    height: 100%;
    border: none;
    display: block;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    margin-top: 30px;
    padding: 25px 0 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
    justify-items: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.footer-section:last-child {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 10px;
}

.footer-section h3 {
    color: #2C5F7C;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.footer-section p {
    color: #666;
    margin-bottom: 5px;
    font-size: 0.85em;
}

.footer-section a {
    color: #2C5F7C;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #1E4A5F;
    text-decoration: underline;
}

.footer-logo {
    margin-bottom: 10px;
    text-align: center;
}

.logo-footer {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.logo-footer:hover {
    opacity: 1;
    transform: scale(1.05);
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    color: #999;
    font-size: 0.8em;
}

/* Contact Email Link */
.contact-email {
    color: #2C5F7C;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.contact-email:hover {
    color: #1E4A5F;
    text-decoration: underline;
}

/* Modal de Contacto */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
    position: relative;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #2C5F7C;
}

.modal-content h2 {
    color: #2C5F7C;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 0.95em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2C5F7C;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-submit,
.btn-cancel {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit {
    background: linear-gradient(135deg, #2C5F7C 0%, #1E4A5F 100%);
    color: white;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(44, 95, 124, 0.3);
}

.btn-cancel {
    background: #f0f0f0;
    color: #666;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 20px;
    }

    .modal-content h2 {
        font-size: 1.5em;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        max-width: 180px;
        max-height: 90px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .logo-footer {
        max-width: 100px;
        max-height: 100px;
    }

    .nav-wrapper {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .nav-logo-column {
        justify-content: center;
    }

    .nav-menu {
        justify-content: center;
        gap: 3px;
    }

    .nav-link {
        padding: 8px 15px;
        font-size: 0.85em;
    }

    .content-wrapper {
        padding: 8px;
        min-height: 600px;
    }

    #iframe-container {
        min-height: 600px;
        height: calc(100vh - 250px);
    }

    #iframe-container iframe {
        min-height: 600px;
        height: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;
    }

    .footer-section:last-child {
        grid-column: 1;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 150px;
        max-height: 75px;
    }

    header h1 {
        font-size: 1.3em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    .logo-footer {
        max-width: 80px;
        max-height: 80px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 0.8em;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

.loading::after {
    content: "";
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2C5F7C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

