/* 🎨 ESTILOS PRINCIPALES - EducacionFisica.eu */

/* Reset y variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-600: #2563eb;
    --blue-800: #1e40af;
    --purple-100: #f3e8ff;
    --purple-600: #9333ea;
    --purple-800: #6b21a8;
    --orange-100: #ffedd5;
    --orange-800: #9a3412;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(to bottom, var(--green-50), white);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-weight: bold;
    color: var(--green-700);
    font-size: 18px;
}

.nav-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-link {
    color: var(--green-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--green-800);
}

.btn-register {
    background: var(--green-600);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-register:hover {
    background: var(--green-700);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

.hero-logo {
    width: min(80vw, 500px);
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
    will-change: transform;
    transition: transform 0.05s ease-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.arrow-down {
    width: 32px;
    height: 32px;
    stroke: var(--green-600);
    stroke-width: 2;
}

/* Main Content */
.content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 20px;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    .grid-layout {
        grid-template-columns: 280px 1fr 280px;
    }
}

/* Sidebars */
.sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 88px;
}

.sidebar h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 2px solid;
}

.sidebar-left h2 {
    color: var(--green-800);
    border-color: var(--green-600);
}

.sidebar-right h2 {
    color: var(--blue-800);
    border-color: var(--blue-600);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.3s;
    margin-bottom: 8px;
}

.sidebar-left .sidebar-link:hover {
    background: var(--green-50);
    color: var(--green-700);
    transform: translateX(5px);
}

.sidebar-right .sidebar-link:hover {
    background: var(--blue-50);
    color: var(--blue-700);
    transform: translateX(5px);
}

.sidebar-icon {
    font-size: 24px;
}

/* Main Content Area */
.main-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 32px;
    margin-bottom: 32px;
}

.main-content h1 {
    font-size: 36px;
    font-weight: bold;
    color: var(--green-800);
    margin-bottom: 16px;
}

.main-content > p {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Role Cards */
.role-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
}

@media (min-width: 768px) {
    .role-cards {
        grid-template-columns: 1fr 1fr;
    }
}

.role-card {
    padding: 24px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-estudiantes {
    background: linear-gradient(135deg, var(--green-100), var(--green-50));
}

.card-profesores {
    background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
}

.card-opositores {
    background: linear-gradient(135deg, var(--purple-100), #faf5ff);
}

.card-deportistas {
    background: linear-gradient(135deg, var(--orange-100), #fef3c7);
}

.role-card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.role-card h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
}

.card-estudiantes h3 { color: var(--green-800); }
.card-profesores h3 { color: var(--blue-800); }
.card-opositores h3 { color: var(--purple-800); }
.card-deportistas h3 { color: var(--orange-800); }

.role-card p {
    color: var(--gray-700);
    line-height: 1.5;
}

/* Featured Content */
.featured-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 32px;
}

.featured-content h2 {
    font-size: 30px;
    font-weight: bold;
    color: var(--green-800);
    margin-bottom: 24px;
}

.article {
    padding: 16px 0 16px 16px;
    border-left: 4px solid;
    margin-bottom: 24px;
}

.article:nth-child(2) { border-color: var(--green-600); }
.article:nth-child(3) { border-color: var(--blue-600); }
.article:nth-child(4) { border-color: var(--purple-600); }

.article h3 {
    font-size: 20px;
    font-weight: bold;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.article p {
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 8px;
}

.article a {
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}

.article:nth-child(2) a { color: var(--green-600); }
.article:nth-child(3) a { color: var(--blue-600); }
.article:nth-child(4) a { color: var(--purple-600); }

.article a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--gray-900);
    color: white;
    margin-top: 80px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-brand-text h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.footer-brand-text p {
    color: #9ca3af;
    font-size: 14px;
}

.footer-description {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #86efac; /* green-300 */
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    background: #1f2937;
    padding: 12px;
    border-radius: 50%;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    background: var(--green-600);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 32px;
    text-align: center;
    color: #9ca3af;
}

/* Sidebar Categories (Expandible) */
.sidebar-category {
    margin-bottom: 8px;
}

.sidebar-category-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--gray-700);
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.sidebar-left .sidebar-category-btn:hover {
    background: var(--green-50);
    color: var(--green-700);
}

.sidebar-right .sidebar-category-btn:hover {
    background: var(--blue-50);
    color: var(--blue-700);
}

.category-arrow {
    margin-left: auto;
    transition: transform 0.3s;
}

.sidebar-category.expanded .category-arrow {
    transform: rotate(180deg);
}

.sidebar-subcategory {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 16px;
}

.sidebar-category.expanded .sidebar-subcategory {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.sidebar-sublink {
    font-size: 0.95rem;
    padding: 10px 12px;
}

/* Mobile Responsive */
@media (max-width: 1023px) {
    .sidebar {
        position: static;
    }

    .hero-logo {
        width: min(90vw, 400px);
    }

    .navbar-content {
        padding: 0 16px;
    }

    .logo-text {
        display: none;
    }

    @media (min-width: 640px) {
        .logo-text {
            display: block;
        }
    }
}
