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

:root {
    --primary-color: #9B59B6;
    --primary-dark: #7D3C98;
    --primary-light: #BB8FCE;
    --secondary-color: #ffffff;
    --text-dark: #2C3E50;
    --text-light: #6C7A89;
    --background-light: #F8F9FA;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(155, 89, 182, 0.2);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #9B59B6 0%, #BB8FCE 100%);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.8s ease-out 0.2s both;
    cursor: pointer;
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid white;
    padding: 5px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

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

.logo-text {
    color: white;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

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

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 400;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    opacity: 0.9;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.75) 100%), 
                      url('fondo de pantalla.avif');
    background-size: cover;
    background-position: center 55%;
    background-attachment: fixed;
    background-repeat: no-repeat;
    margin-top: 70px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(155, 89, 182, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(187, 143, 206, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.2) 0%, rgba(187, 143, 206, 0.15) 100%);
    backdrop-filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 72px;
    font-weight: 700;
    color: white;
    margin-bottom: 30px;
    font-style: italic;
    letter-spacing: -1px;
    line-height: 1.1;
    animation: fadeInUp 1s ease-out 0.2s both;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
}

.hero-text {
    font-size: 20px;
    color: white;
    margin-bottom: 40px;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.4s both;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.btn {
    padding: 16px 40px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(155, 89, 182, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Content Pages Styles */
.content-section {
    margin-top: 70px;
    padding: 80px 0;
    min-height: calc(100vh - 70px);
    background: var(--background-light);
}

.page-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.page-subtitle {
    font-size: 20px;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

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

.card {
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out both;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #9B59B6 0%, #BB8FCE 50%, #E8D5F2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    color: white;
    font-size: 28px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.35);
    border: 5px solid white;
    position: relative;
}

.card-icon::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.2), rgba(187, 143, 206, 0.2));
    z-index: -1;
}

.card-icon img {
    width: 95%;
    height: 95%;
    object-fit: contain;
    padding: 10px;
    border-radius: 50%;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    width: 100%;
}

.card-text {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.info-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.info-box h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
}

.info-box p, .info-box ul {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 16px;
}

.info-box ul {
    list-style-position: inside;
    margin-top: 10px;
}

.info-box li {
    margin: 12px 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dark);
}

/* Contact Section */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 25px;
    border-radius: 15px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: var(--shadow);
    min-height: 200px;
    text-align: center;
}

.contact-item:hover {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.05), rgba(187, 143, 206, 0.05));
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    flex-shrink: 0;
}

.contact-details h3 {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
}

.contact-details p {
    color: var(--text-dark);
    font-size: 15px;
    margin: 5px 0;
    line-height: 1.6;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
    display: inline-block;
    font-size: 16px;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: linear-gradient(135deg, #9B59B6 0%, #BB8FCE 100%);
        padding: 20px;
        gap: 15px;
        width: 100%;
        z-index: 999;
    }

    .nav.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-text {
        font-size: 18px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 90%;
        max-width: 400px;
    }
    
    .btn {
        display: block !important;
        width: 100% !important;
        text-align: center;
        padding: 14px 30px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 36px;
    }
}
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-text {
        font-size: 16px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .card {
        padding: 25px;
    }
}

/* Animation delays for cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* Forum Categories - Small Squares */
.forum-categories {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 20px !important;
    margin: 30px 0 !important;
}

.category-card {
    background: white !important;
    border-radius: 15px !important;
    padding: 25px !important;
    box-shadow: var(--shadow) !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    border-left: 4px solid #9B59B6 !important;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

.category-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--shadow-lg) !important;
}

.category-card h3 {
    color: #9B59B6 !important;
    margin-bottom: 10px !important;
    font-size: 18px !important;
}

.category-card p {
    color: var(--text-light) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* 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.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #9B59B6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #7D3C98;
    transform: scale(1.2);
}

.modal h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    margin-top: 20px;
    font-size: 28px;
}

.modal p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 16px;
}

.modal ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal li {
    color: var(--text-dark);
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.7;
}

/* Improve text readability */
.page-subtitle {
    font-size: 18px !important;
}

.info-box p {
    font-size: 16px !important;
    line-height: 1.8 !important;
}

.info-box li {
    font-size: 15px !important;
    margin: 10px 0 !important;
}

.card-text {
    cursor: pointer;
}

.card {
    cursor: pointer;
    position: relative;
}

.card::after {
    content: '→ Leer más';
    position: absolute;
    bottom: 10px;
    right: 15px;
    color: var(--primary-color);
    font-size: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 600;
}

.card:hover::after {
    opacity: 1;
    transform: translateX(5px);
}
