/* ======================= */
/* GLOBAL VARIABLES        */
/* ======================= */
:root {
    --primary-color: #1e3a5f;
    --secondary-color: #162b4a;
    --accent-color: #ff8c00;
    --accent-color-hover: #e67e00;
    --white-color: #fff;
    --text-color: #333;
    --light-gray-color: #f5f7fa;
    --link-color: #cfd8dc;
    --link-hover-color: #2a4a7a;
    --sidebar-bg: #ffffff;

    --shadow-soft: 0 4px 10px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 6px 14px rgba(0, 0, 0, 0.1);
    --shadow-side: 2px 0 8px rgba(0, 0, 0, 0.1);
    --border-gray: 1px solid #e2e8f0;

    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.7s ease;
}

/* ======================= */
/* BASIC RESET             */
/* ======================= */
html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--light-gray-color);
    min-height: 100vh;
}

/* ======================= */
/* MAIN STRUCTURE          */
/* ======================= */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    transition: var(--transition-normal);
}

.app-wrapper.sidebar-hidden .main-content {
    margin-left: 0;
}

/* ======================= */
/* HEADER                  */
/* ======================= */

.page-header {
    background: var(--white-color);
    padding: 1.5rem 2rem;
    border-bottom: var(--border-gray);
    box-shadow: var(--shadow-soft);
}

.page-header h1 {
    font-size: 2.25rem;
    color: var(--primary-color);
}

.title-h1 {
    text-align: center;
    color: var(--primary-color);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--white-color);
    padding: 1rem 2rem;
    border-bottom: var(--border-gray);
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

/* ======================= */
/* SIDEBAR                 */
/* ======================= */
.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--text-color);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-side);
    transition: var(--transition-slow);
    border-right: var(--border-gray);
    z-index: 999;
}

.sidebar.hidden {
    width: 0;
    overflow: hidden;
}

.sidebar-header {
    padding: 2rem 1rem;
    background: var(--secondary-color);
    text-align: center;
}

.logo {
    font-size: 23px;
    margin-left: 60px;
    font-weight: bold;
    color: var(--white-color);
    text-decoration: none;
}

.sidebar-nav {
    margin-top: 2rem;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li+li {
    margin-top: 0.75rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s, padding-left 0.3s;
}

.sidebar-nav a:hover {
    background: var(--link-hover-color);
    color: var(--white-color);
    padding-left: 1.5rem;
}

/* ======================= */
/* MAIN CONTENT            */
/* ======================= */
.main-content {
    margin-top: 70px;
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.8s ease;
    padding: 1rem;
}

main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* ======================= */
/* HERO SLIDER             */
/* ======================= */
.hero-slider {
    position: relative;
    height: 65vh;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.slides-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    position: relative;
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.9s ease-in-out;
}

.slide.active {
    opacity: 1;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    display: block;
}

/* SLIDER BUTTONS */
.slider-btn {
    position: absolute;
    top: 50%;
    width: 50px;
    transform: translateY(-50%);
    background: rgba(30, 58, 95, 0.6);
    border: none;
    color: var(--white-color);
    font-size: 2rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: rgba(30, 58, 95, 0.8);
}

.prev-btn {
    left: 1rem;
}

.next-btn {
    right: 1rem;
}

/* ======================= */
/* SECTIONS                */
/* ======================= */
section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
}

section h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    display: block;
    margin-top: 0.5rem;
    border-radius: 2px;
}

/* ======================= */
/* CARDS                   */
/* ======================= */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--white-color);
    padding: 1.75rem;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
}

.card h3 {
    color: #006699;
    margin-bottom: 0.75rem;
}

.card p {
    color: #555;
    font-size: 0.95rem;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* ======================= */
/* STATS                   */
/* ======================= */
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

.stat {
    background: var(--white-color);
    flex: 1 1 200px;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s;
}

.stat:hover {
    transform: translateY(-4px);
}

.stat span {
    display: block;
    font-size: 2.25rem;
    color: var(--accent-color);
    font-weight: 600;
}

.stat p {
    margin-top: 0.5rem;
    color: #666;
}

/* ======================= */
/* PROJECT CARDS           */
/* ======================= */
.project-card {
    display: flex;
    flex-direction: column;
    background: var(--white-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

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

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
    text-align: left;
}

.project-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.project-content p {
    color: #555;
    margin-bottom: 1rem;
}

.project-content .btn {
    background: var(--accent-color);
    color: var(--white-color);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.project-content .btn:hover {
    background: var(--accent-color-hover);
}

/* ======================= */
/* CHARTS SECTION          */
/* ======================= */
.charts-section {
    margin-top: 3rem;
}

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

.chart-card {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
}

.chart-card h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* ======================= */
/* AERO TYPES              */
/* ======================= */
.aero-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.aero-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    cursor: pointer;
}

.aero-card img {
    width: 100%;
    display: block;
    height: 400px;
    transition: transform 0.4s ease;
}

.aero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 95, 0.9);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.aero-overlay h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.aero-card:hover .aero-overlay {
    transform: translateY(0);
}

.aero-card:hover img {
    transform: scale(1.05);
}

/* ======================= */
/* CONTACT SECTION         */
/* ======================= */
.contact-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f8fafc;
    padding: 3rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.contact-top-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 750px;
    width: 100%;
    margin-bottom: 3rem;
}



/* Formulario de contacto */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.contact-form h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #1e3a5f;
    font-size: 1rem;
}

.form-group textarea+i {
    top: 20px;
    transform: none;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    padding-top: 15px;
    min-height: 120px;
    resize: none;
}

.contact-form select {
    appearance: none;
    background: white;
}

.contact-form .btn {
    display: block;
    margin: auto;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}


/* Responsive */
@media (max-width: 1024px) {
    .contact-top-row {
        gap: 2rem;
    }
}

@media (max-width: 768px) {

    .contact-section {
        padding: 2rem;
    }

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

    .contact-info,
    .contact-form {
        padding: 1.5rem;
    }

    .map-container {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 1.5rem;
    }

    .map-container {
        height: 300px;
    }

    .btn-map {
        width: 100%;
        justify-content: center;
    }
}

/* ======================= */
/* MODAL                   */
/* ======================= */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

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

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 970px;
    position: relative;
    padding: 2rem;
    animation: modalFadeIn 0.4s ease-out forwards;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.75rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    border: none;
    padding: 0.5rem;
}

.close-modal:hover {
    color: #1f2937;
    transform: scale(1.1);
}

.modal-content h2 {
    color: #1e40af;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    text-align: center;
}

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

.developer-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

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

.developer-card img {
    width: 210px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 3px solid #e5e7eb;
    transition: all 0.3s ease;
}

.developer-card:hover img {
    border-color: #3b82f6;
}

.developer-card p {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.github-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: all 0.2s ease;
}

.github-link:hover {
    color: #2563eb;
}

.fab.fa-github {
    font-size: 1.25rem;
    margin-left: 0.5rem;
}





/* ======================= */
/* BUTTONS                 */
/* ======================= */
.btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white-color);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

.btn:hover {
    background: var(--accent-color-hover);
    transform: translateY(-2px);
}

/* ======================= */
/* HAMBURGER BUTTON        */
/* ======================= */
.hamburger-btn {
    position: fixed;
    top: 1.60rem;
    left: 1rem;
    background-color: #1e3e82;
    color: var(--white-color);
    font-size: 1.5rem;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    z-index: 11000;
    cursor: pointer;
}

.hamburger-btn.active {
    background-color: #e63946;
}

/* ======================= */
/* RESPONSIVE DESIGN       */
/* ======================= */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100%;
        transition: left 0.3s ease-in-out;
        z-index: 9999;
    }

    .sidebar.show-mobile {
        left: 0;
    }



    .main-content {
        margin-left: 0;
    }

    .overlay-mobile {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        display: none;
    }

    .overlay-mobile.active {
        display: block;
    }

    .modal-content {
        padding: 1.5rem;
        max-width: 95%;
    }

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

    .developer-card {
        padding: 1.25rem;
    }

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

    .main-content {
        margin-left: 0;
    }

    .fixed-header {
        padding: 4rem;
        justify-content: flex-start;
        padding-left: 70px;
    }

    .title-h1 {
        font-size: 1.5rem;
    }
}


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

    .developer-card img {
        width: 100px;
        height: 100px;
    }

    .close-modal {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.5rem;
    }


}


/* ======================= */
/* FOOTER                  */
/* ======================= */
.footer {
    background: var(--white-color);
    text-align: center;
    padding: 1.5rem 0;
    border-top: var(--border-gray);
    font-size: 0.9rem;
    color: #777;
}

.modern-footer {
    background-color: #1e3a5f;
    color: #ffffff;
    padding: 3rem 0 0;
    font-family: 'Inter', sans-serif;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Dos columnas en desktop */
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.footer-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    display: inline-block;
}

.footer-description {
    color: #cfd8dc;
    line-height: 1.6;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

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

.footer-newsletter h3 {
    color: #ffffff;
    font-size: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

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

.footer-newsletter p {
    color: #cfd8dc;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.newsletter-form input::placeholder {
    color: #cfd8dc;
}

.newsletter-form button {
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 600;
}

.newsletter-form button:hover {
    background-color: var(--accent-color-hover);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 2rem;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.legal-links a {
    color: #cfd8dc;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-brand {
        max-width: 100%;
        text-align: center;
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-newsletter {
        text-align: center;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .footer-container {
        padding: 0 1.5rem;
    }

    .footer-bottom {
        padding: 1.5rem 1rem;
    }

    .newsletter-form {
        width: 100%;
    }
}

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

    .footer-bottom {
        padding: 1rem;
    }

    .legal-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}