:root {
    --primary-color: #2c3e50; /* Dark Blue */
    --secondary-color: #34495e; /* Lighter Dark Blue */
    --accent-color: #3498db; /* Bright Blue */
    --light-grey-color: #ecf0f1;
    --white-color: #ffffff;
    --dark-text-color: #333333;
    --light-text-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
}

body {
    background-color: var(--white-color);
    color: var(--dark-text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.button-link {
    display: inline-block;
    padding: 12px 24px;
    margin-top: 15px;
    background-color: var(--accent-color);
    color: var(--white-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.button-link:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-decoration: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white-color);
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar .logo {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
}

.navbar .nav-links {
    display: flex;
    gap: 25px;
}

.navbar .nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

.navbar .nav-links a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    width: 100vw;
    height: 60vh;
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), url("bg.jpg") no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
}

.hero-box {
    padding: 25px;
    border-radius: 8px;
    max-width: 700px;
    margin-top: 60px;
}

.hero-box h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 60px;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-box p {
    font-size: 20px;
    font-weight: 300;
}

/* Content Section */
.content {
    padding: 60px 40px;
    background-color: var(--light-grey-color);
}

.section-container {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-text {
    flex: 1;
}

.section-text h2 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.section-text p {
    font-size: 18px;
    line-height: 1.7;
    text-align: left;
    margin-bottom: 10px;
}

.section-image {
    flex: 1;
    height: 0; /* To use padding-bottom for aspect ratio */
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

@media (min-width: 769px) {
    .section-image {
        min-height: 350px; /* Restore min-height for desktop */
        padding-bottom: 0; /* Remove padding-bottom for desktop */
    }
}


#cybersecurity-image {
    background: url("18.jpg") center/cover no-repeat;
}

#ctf-training-image {
    background: url("ctftrain.png") center/cover no-repeat;
}

#orientamento-image {
    background: url("ricoh.jpg") center/cover no-repeat;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    background: var(--primary-color);
    color: var(--white-color);
}

.footer .social-links a {
    color: var(--white-color);
    margin: 0 15px;
    font-size: 24px;
}

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

.footer p {
    margin-top: 15px;
    font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        position: absolute;
        top: 65px;
        left: 0;
        width: 100%;
        background: var(--white-color);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
    }

    .nav-links.active {
        max-height: 500px; /* Adjust as needed */
    }

    .nav-links a {
        padding: 15px;
        text-align: center;
        border-bottom: 1px solid var(--light-grey-color);
    }

    .hero {
        height: 50vh;
    }

    .hero-box h1 {
        font-size: 48px;
    }

    .hero-box p {
        font-size: 18px;
    }

    .content {
        padding: 40px 20px;
    }

    .section-container {
        flex-direction: column;
        gap: 30px;
    }

    .section-container.reversed {
        flex-direction: column-reverse;
    }

    .section-image {
        min-height: 200px; /* Fixed height for mobile */
        width: 100%; /* Ensure full width on mobile */
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content h2 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    color: var(--dark-text-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--accent-color);
}

.modal-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: var(--light-grey-color);
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-link:hover {
    background-color: var(--accent-color);
    color: var(--white-color);
    text-decoration: none;
    transform: translateX(5px);
}

.modal-link i {
    font-size: 24px;
    width: 30px;
    text-align: center;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
    }

    .modal-content h2 {
        font-size: 24px;
    }

    .modal-link {
        font-size: 16px;
        padding: 12px 15px;
    }

    .modal-link i {
        font-size: 20px;
    }
}