@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Outfit:wght@400;700;900&display=swap');

:root {
    --primary: #E03131;
    --primary-light: #FF5C5C;
    --secondary: #0B192C;
    --accent: #E03131;
    --bg-dark: #050A14;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-main: #F8F9FA;
    --text-muted: #ADB5BD;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}
body.modal-open {
    overflow: hidden;
    height: 100vh;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(rgba(5, 10, 20, 0.85), rgba(5, 10, 20, 0.85)), url('fondo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(5, 10, 20, 0.8);
    border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
    height: 55px;
    transition: var(--transition);
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.nav-logo:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 5% 60px;
    position: relative;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    z-index: 1;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s 0.2s forwards;
}

.hero h1 span {
    color: var(--primary);
    display: block;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s 0.4s forwards;
}

/* Training Section */
.training-cta {
    padding: 100px 5%;
    background: linear-gradient(to bottom, transparent, rgba(224, 49, 49, 0.05), transparent);
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(224, 49, 49, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.training-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: 2px solid var(--primary);
    box-shadow: 0 10px 20px rgba(224, 49, 49, 0.2);
}

.btn:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(224, 49, 49, 0.3);
}

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

.btn-donate {
    background: #FFD700 !important;
    color: #000 !important;
    border-color: #FFD700 !important;
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2) !important;
    padding: 0.6rem 1.5rem !important;
    font-size: 0.9rem !important;
}

.btn-donate:hover {
    background: transparent !important;
    color: #FFD700 !important;
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.3) !important;
}

.btn-outline {
    background: transparent !important;
    border: 2px solid var(--primary) !important;
    color: var(--primary) !important;
    box-shadow: none !important;
    padding: 0.6rem 1.5rem !important;
    font-size: 0.9rem !important;
}

.btn-outline:hover {
    background: var(--primary) !important;
    color: white !important;
}

/* History Summary Section */
.history-summary {
    padding: 60px 5%;
    margin-top: -80px;
    position: relative;
    z-index: 5;
}

.history-card {
    background: rgba(10, 20, 40, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3.5rem;
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.history-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.history-card h2 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    line-height: 1.2;
}

.history-card h2 span {
    color: var(--primary-light);
}

.history-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.history-info p {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.history-meta {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.meta-item:hover {
    background: rgba(224, 49, 49, 0.05);
    border-color: rgba(224, 49, 49, 0.2);
}

.meta-item i {
    font-size: 1.5rem;
    color: var(--primary);
    background: rgba(224, 49, 49, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.meta-item h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: white;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
}

.meta-item p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Units Section */
.units {
    padding: 100px 5%;
}

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

.section-title h2 {
    font-size: 3rem;
}

.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.unit-card {
    background: #000000;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 320px;
}

.unit-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    transition: var(--transition);
    z-index: 0;
}

.card-b11::before { background-image: url('b11.png'); }
.card-rx11::before { background-image: url('rx11.jpeg'); }

.unit-card:hover::before {
    opacity: 0.4;
    transform: scale(1.1);
}

.unit-card > * {
    position: relative;
    z-index: 1;
}

.unit-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Info Section */
.info-section {
    padding: 100px 5%;
}

.info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.info-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.info-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Map Section */
.location {
    padding: 100px 5%;
    text-align: center;
}

.map-container {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.map-container iframe {
    width: 100%;
    height: 450px;
    display: block;
}
footer {
    padding: 4rem 5% 2rem;
    background: #02050A;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    height: 60px;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.credits {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2rem;
}

.credits a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .info-content {
        gap: 2rem;
    }
    .hero h1 {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1rem 5%;
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav-actions .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
        flex: 1;
        min-width: 120px;
    }
    
    .nav-logo {
        height: 45px;
    }

    .hero {
        padding-top: 180px;
    }

    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1rem;
    }

    .info-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .info-image {
        order: -1;
    }

    .section-title h2 {
        font-size: 2.5rem;
    }

    .unit-grid {
        grid-template-columns: 1fr;
    }

    .map-container iframe {
        height: 300px;
    }

    .history-card {
        padding: 2rem;
    }

    .history-card h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .history-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .history-info p {
        font-size: 1rem;
    }

    .meta-item {
        gap: 1rem;
        padding: 1rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-dark);
    margin: 5% auto;
    width: 90%;
    max-width: 900px;
    border-radius: 30px;
    position: relative;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    animation: modalIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-info h2 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.modal-divider {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin-bottom: 2rem;
}

.modal-info p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.modal-specs h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
}

.modal-specs ul {
    list-style: none;
}

.modal-specs li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.modal-specs li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
}

.unit-card {
    cursor: pointer;
}

.view-more {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--primary-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
    .modal-content {
        margin: 2% auto;
        width: 95%;
        border-radius: 20px;
    }
    .modal-image {
        height: 200px;
    }
    .modal-info {
        padding: 1.5rem;
    }
    .modal-info h2 {
        font-size: 2rem;
    }
    .close-modal {
        right: 15px;
        top: 10px;
        background: rgba(0,0,0,0.5);
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
}

