/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #121212; /* Dark background */
    color: #e0e0e0; /* Light text color */
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: #ffffff;
    margin-bottom: 0.8em;
}

h1 { font-size: 3em; font-weight: 700; }
h2 { font-size: 2.5em; font-weight: 600; text-align: center; margin-bottom: 1.5em; }
h3 { font-size: 1.5em; font-weight: 600; }

p {
    margin-bottom: 1em;
    color: #b0b0b0; /* Slightly dimmer text for paragraphs */
}

a {
    color: #ff4a57; /* Accent color */
    text-decoration: none;
}

a:hover {
    color: #e0e0e0;
}

section {
    padding: 80px 0;
}

/* Header */
header {
    background-color: #1a1a1a; /* Slightly lighter dark for header */
    padding: 1em 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 1.8em;
    font-weight: 700;
    color: #ffffff;
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 25px;
}

header nav ul li a {
    color: #e0e0e0;
    font-weight: 400;
    transition: color 0.3s ease;
}

header nav ul li a:hover,
header nav ul li a.active {
    color: #ff4a57;
}

/*paralax*/

.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  background: #111;
  overflow: hidden;
}

.gallery-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem 2rem;
  border-radius: 10px;
  backdrop-filter: blur(6px);
  z-index: 10;
  text-align: center;
  color: #fff;
}

.gallery-text p{
    color: #fff;
}

.gallery-img {
  position: absolute;
  width: 300px;
  opacity: 0;
  animation: floatUp linear infinite;
  will-change: transform, opacity;
}

@media (min-width: 1024px) {
  .gallery-text {
    width: 50%;
  }
}

@media (max-width: 767px) {
  .gallery-img {
    width: 150px;
  }
}

.fg {
  z-index: 3;
  filter: none;
  transform: scale(1.1);
}

.bg {
  z-index: 1;
  filter: blur(8px);
  transform: scale(0.8);
}

@keyframes floatUp {
  0% {
    transform: translateY(120vh);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(-200px);
    opacity: 0;
  }
}

/* Hero Section */
#hero {
    background: url('../img/hero-background.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: #fff;
    padding: 0; /* Remove section padding */
}

#hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Dark overlay */
    z-index: 1;
}

#hero .hero-content {
    position: relative;
    z-index: 2;
}

#hero h1 {
    font-size: 4em;
    margin-bottom: 0.3em;
}

#hero p {
    font-size: 1.5em;
    margin-bottom: 1.5em;
    color: #f0f0f0;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-primary {
    background-color: #ff4a57; /* Accent color */
    color: #fff;
}

.btn-primary:hover {
    background-color: #e03845; /* Darker accent */
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
}

.btn-secondary:hover {
    background-color: #ff4a57;
    border-color: #ff4a57;
    color: #fff;
}

/* Events Section */
#events {
    background-color: #121212;
    padding-bottom: 80px;
}

.event-search-filters {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.search-bar {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

#event-search-input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 25px;
    color: #e0e0e0;
    transition: border-color 0.3s, background-color 0.3s;
}

#event-search-input:focus {
    outline: none;
    border-color: #ff4a57;
    background-color: #2a2a2a;
}

#event-search-input::placeholder {
    color: #888;
}

.event-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: #333;
    color: #e0e0e0;
    border: 2px solid #555;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-size: 1.2em;
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.filter-btn.active {
    background-color: #ff4a57;
    color: #fff;
    border-color: #ff4a57;
}

.filter-btn .filter-name {
    visibility: hidden;
    width: 120px;
    background-color: #222;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position the tooltip above the button */
    left: 50%;
    margin-left: -60px; /* Use half of the width to center */
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}

.filter-btn:hover .filter-name {
    visibility: visible;
    opacity: 1;
}

.filter-btn[data-filter="all"] {
    width: auto;
    height: 50px;
    padding: 0 25px;
    border-radius: 25px;
    font-size: 1em;
}

.filter-btn[data-color] {
    background-color: var(--color-bg, #333);
    border-color: var(--color-border, #555);
    color: #fff;
}
.filter-btn[data-color]:hover {
    background-color: var(--color-hover, #555);
    border-color: var(--color-hover, #777);
}
.filter-btn[data-color].active {
    background-color: var(--color-active, #ff4a57);
    border-color: var(--color-active, #ff4a57);
    box-shadow: 0 0 15px var(--color-active, #ff4a57);
}

.filter-btn[data-color="#00A8E8"] { --color-bg: #00A8E8; --color-hover: #0097D1; --color-active: #00A8E8; }
.filter-btn[data-color="#E84855"] { --color-bg: #E84855; --color-hover: #D0404C; --color-active: #E84855; }
.filter-btn[data-color="#FFC914"] { --color-bg: #FFC914; --color-hover: #E6B512; --color-active: #FFC914; }
.filter-btn[data-color="#D8D8D8"] { --color-bg: #777; --color-hover: #999; --color-active: #BDBDBD; color: #111;}
.filter-btn[data-color="#C0C0C0"] { --color-bg: #C0C0C0; --color-hover: #ADADAD; --color-active: #C0C0C0; color: #111;}
.filter-btn[data-color="#2D3047"] { --color-bg: #2D3047; --color-hover: #222536; --color-active: #2D3047; }
.filter-btn[data-color="#4CAF50"] { --color-bg: #4CAF50; --color-hover: #45A049; --color-active: #4CAF50; }
.filter-btn[data-color="#E63946"] { --color-bg: #E63946; --color-hover: #CE323E; --color-active: #E63946; }
.filter-btn[data-color="#9D4EDD"] { --color-bg: #9D4EDD; --color-hover: #8C46C4; --color-active: #9D4EDD; }


/* Hides slides for filtering */
#events .swiper-slide.hidden {
    display: none;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.event-item {
    display: flex;
    background-color: #222;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.event-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    border-color: #444;
}

.event-list-image {
    flex-shrink: 0;
    width: 180px;
    position: relative;
}

.event-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-list-details {
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-list-details h3 {
    font-size: 1.25em;
    margin-bottom: 10px;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 15px;
}

.event-meta span {
    display: flex;
    align-items: center;
}

.event-meta i {
    margin-right: 8px;
    color: #ff4a57;
}

.event-list-details p {
    font-size: 0.95em;
    color: #b0b0b0;
    flex-grow: 1; /* Pushes button to the bottom */
}

.event-list-details .btn {
    align-self: flex-start; /* Align button to the left */
    margin-top: 15px;
    /*background-color: transparent;
    border: 1px solid #777;
    color: #e0e0e0;*/
}

.event-list-details .btn:hover {
    background-color: #ff4a57;
    border-color: #ff4a57;
    color: #fff;
}

/* About Section */
#about {
    background-color: #1f1f1f; /* Slightly different dark shade */
}

#about .about-content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

#about .about-image {
    flex-basis: 35%;
}

#about .about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#about .about-text {
    flex-basis: 65%;
}

/* Services Section */
#services {
    background-color: #1a1a1a;
}

#services .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

#services .service-item {
    background-color: #222222; /* Card background */
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #333;
}

#services .service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

#services .service-item i {
    font-size: 2.5em;
    color: #ff4a57; /* Accent color for icons */
    margin-bottom: 20px;
}

#services .service-item h3 {
    margin-bottom: 10px;
}

/* Contact Section */
#contact {
    background-color: #1f1f1f;
    text-align: center;
}

#contact p {
    font-size: 1.1em;
    margin-bottom: 0.5em;
}

/* Acordeon */

.features {
    display: none;
}

.features ul {
    list-style-position: inside;
    color: #a0a0a0;
}

.features li {
    margin-bottom: 0.8rem;
    padding-left: 1rem;
}

.features li::marker {
    color: #666;
}

.olimpiada-image {
    width: 100%;
    max-width: none;
    max-height: 340px;
    height: auto;
    margin: 0 0 2rem 0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7);
    object-fit: cover;
}

.accordion {
    margin-top: 2rem;
}

.accordion-item {
    margin-bottom: 1rem;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: #555;
}

.accordion-button {
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #161616 100%);
    border: none;
    color: #e0e0e0;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.accordion-button:hover {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
}

.accordion-button.active {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
}

.accordion-icon {
    position: relative;
    width: 20px;
    height: 20px;
}

.accordion-icon .line {
    position: absolute;
    background-color: #e0e0e0;
    transition: all 0.3s ease;
}

.accordion-icon .line:first-child {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.accordion-icon .line:last-child {
    width: 2px;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.accordion-button.active .accordion-icon .line:last-child {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #111;
}

.accordion-content p{
    padding: 1.5rem;
    margin: 0;
    color: #a0a0a0;
    line-height: 1.7;
}

.accordion-content ul{
    padding: 1.5rem;
    margin-left: 1.5rem;
    color: #a0a0a0;
    line-height: 1.7;
}


.accordion-content table{
    padding: 1.5rem;
    margin: 1.5rem;
    border: #a0a0a0;
    color:#fff;
    line-height: 1.7;
    background-color: brown;
    border-collapse: collapse;
    width: 95%;
}

.accordion-content table th,
.accordion-content table td {
    border: 1px solid #a0a0a0;
    padding: 8px;
    text-align: left;
  }

.accordion-content.active {
    max-height: 200px;
}

/* Footer */
footer {
    background-color: #111;
    color: #888;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    border-top: 1px solid #333;
}

footer p {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: center;
    }

    header nav ul {
        margin-top: 10px;
        padding-left: 0; /* Reset padding for centered items */
    }
    
    header nav ul li {
        margin: 0 10px; /* Adjust spacing for smaller screens */
    }

    #hero h1 {
        font-size: 2.8em;
    }

    #hero p {
        font-size: 1.2em;
    }

    h2 {
        font-size: 2em;
    }

    #about .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    #about .about-image {
        margin-bottom: 30px;
        max-width: 300px; /* Control image size on mobile */
    }

    .features {
        margin: 2.5rem -1.5rem 0 -1.5rem;
    }
    
    .olimpiada-image {
        max-height: 340px;
    }
    
    .accordion-button {
        padding: 1.2rem;
        font-size: 1rem;
    }
    
    .accordion-content p {
        padding: 1.2rem;
    }

    .event-search-filters {
        flex-direction: column;
        align-items: center;
    }

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

@media (max-width: 480px) {
    #hero h1 {
        font-size: 2.2em;
    }
    #hero p {
        font-size: 1em;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    header nav ul li {
        margin: 0 8px;
    }
    header nav ul li a {
        font-size: 0.9em;
    }

    .event-item {
        flex-direction: column;
    }
    .event-list-image {
        width: 100%;
        height: 180px;
    }
    .event-list-details {
        align-items: center;
        text-align: center;
    }
    .event-list-details .btn {
        align-self: center;
    }
    .event-meta {
        justify-content: center;
    }

    .accordion-content table{
        font-size: x-small;
        width: auto;
    }
}

.icon-perfil {
  width: 64px;
  height: 64px;
  background-color: #ff4a57; /* tu color */
  -webkit-mask-image: url('../img/perfil.png');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  mask-image: url('../img/perfil.png');
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
}

.icon-gestion {
  width: 64px;
  height: 64px;
  background-color: #ff4a57; /* tu color */
  -webkit-mask-image: url('../img/gestion.png');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  mask-image: url('../img/gestion.png');
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
}

.icon-competencias {
  width: 64px;
  height: 64px;
  background-color: #ff4a57; /* tu color */
  -webkit-mask-image: url('../img/competencias.png');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  mask-image: url('../img/competencias.png');
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
}