/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #FFD700;
    --secondary: #000000;
    --accent: #8B7500;
    --light: #FFF9C4;
    --dark: #1A1A1A;
    --text-light: #F5F5F5;
    --text-dark: #333333;
}

body {
    background-color: #f5f5f5;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary) 50%, var(--primary) 50%, var(--primary) 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,215,0,0.1)"/></svg>');
    background-size: cover;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.logo {
    width: 100px;
    height: 100px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
    border: 3px solid var(--secondary);
}

.logo i {
    font-size: 2.5rem;
    color: var(--secondary);
}

.logo-text {
    font-size: 2.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: white;
}

.subtitle {
    font-size: 1.2rem;
    margin-top: 5px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    position: relative;
    z-index: 2;
}

.badge {
    background: var(--primary);
    color: var(--secondary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Navegación */
nav {
    background-color: var(--secondary);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

nav ul li a i {
    margin-right: 8px;
}

nav ul li a:hover {
    background-color: var(--primary);
    color: var(--secondary);
}

/* Secciones */
section {
    padding: 60px 0;
    flex: 1;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--secondary);
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    margin: 10px auto;
    border-radius: 2px;
}

/* Banner principal */
.banner {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://upload.wikimedia.org/wikipedia/commons/2/2a/Sesquicentenario_Colegio_Nacional_de_San_Juan.jpg') no-repeat center center/cover;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
}

.banner-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.banner h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: var(--primary);
}

.banner p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 2px solid var(--primary);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: var(--secondary);
}

/* Galería */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    position: relative;
    border: 2px solid var(--primary);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: var(--primary);
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Lista de estudiantes */
.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.student-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    border-top: 5px solid var(--primary);
}

.student-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.student-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2rem;
    font-weight: bold;
    border: 3px solid var(--primary);
}

.student-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--secondary);
}

.student-nickname {
    font-style: italic;
    color: #7f8c8d;
    margin-bottom: 10px;
}

/* Historia */
.history {
    background: linear-gradient(to right, var(--light), white);
    padding: 60px 0;
    border-top: 5px solid var(--primary);
    border-bottom: 5px solid var(--secondary);
}

.history-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.history-text {
    flex: 1;
}

.history-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 3px solid var(--primary);
}

.history-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Eventos */
.events-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.events-timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(to bottom, var(--secondary), var(--primary));
    transform: translateX(-50%);
}

.event {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    position: relative;
    width: calc(50% - 30px);
    border-left: 5px solid var(--primary);
}

.event:nth-child(odd) {
    margin-left: auto;
}

.event:before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary);
    border: 3px solid var(--primary);
}

.event:nth-child(odd):before {
    left: -40px;
}

.event:nth-child(even):before {
    right: -40px;
}

.event-date {
    font-weight: bold;
    color: var(--secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.event-date i {
    margin-right: 8px;
    color: var(--primary);
}

/* Contacto */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-top: 5px solid var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,215,0,0.2);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: var(--secondary);
    color: var(--primary);
    padding: 40px 0 20px;
    text-align: center;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.social-links {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,215,0,0.1);
    border-radius: 50%;
    margin: 0 10px;
    color: var(--primary);
    text-decoration: none;
    transition: background 0.3s;
}

.social-link:hover {
    background: rgba(255,215,0,0.3);
}

.copyright {
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
    position: relative;
    z-index: 2;
}

/* Patente transparente */
.patent {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    color: rgba(255, 215, 0, 0.8);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 5px 0;
    }
    
    .banner h1 {
        font-size: 2rem;
    }
    
    .history-content {
        flex-direction: column;
    }
    
    .events-timeline:before {
        left: 20px;
    }
    
    .event {
        width: calc(100% - 60px);
        margin-left: 60px;
    }
    
    .event:nth-child(odd) {
        margin-left: 60px;
    }
    
    .event:before {
        left: -40px;
    }
    
    .event:nth-child(even):before {
        left: -40px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
}