/* ================================================
   Competencia Digital Ciudadana - Main Stylesheet
   Alfabetización Digital + Inclusión + Ciudadanía
   ================================================ */

/* === FONTS === */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

/* === CSS RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-blue: #1976D2;
    --primary-violet: #7E57C2;
    --learning-green: #43A047;
    --inclusion-yellow: #FFC107;
    --white-bg: #F5F5F5;
    --white: #FFFFFF;
    --text-dark: #212121;
    --text-medium: #424242;
    --text-light: #757575;
    
    /* Typography */
    --font-title: 'DM Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;
    
    --title-size: 45px;
    --body-size: 18px;
    --caption-size: 15px;
    --line-height: 1.82;
    
    /* Layout */
    --hero-height: 88vh;
    --wide-width: 1180px;
    --medium-width: 900px;
    --compact-width: 700px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--body-size);
    line-height: var(--line-height);
    color: var(--text-dark);
    background-color: var(--white-bg);
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: var(--title-size);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 38px;
    color: var(--primary-blue);
}

h3 {
    font-size: 28px;
    color: var(--primary-violet);
}

p {
    margin-bottom: 1.2rem;
    color: var(--text-medium);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-violet);
}

/* === UTILITY CLASSES === */
.container-wide {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 30px;
}

.container-medium {
    max-width: var(--medium-width);
    margin: 0 auto;
    padding: 0 30px;
}

.container-compact {
    max-width: var(--compact-width);
    margin: 0 auto;
    padding: 0 30px;
}

.section {
    padding: 80px 0;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-violet) 100%);
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 30px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-violet) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(121, 87, 194, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(121, 87, 194, 0.4);
    color: white;
}

.btn-secondary {
    background: var(--learning-green);
    color: white;
}

.btn-secondary:hover {
    background: #388E3C;
    color: white;
}

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

.btn-outline:hover {
    background: var(--primary-blue);
    color: white;
}

/* === NAVIGATION === */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.12);
}

.nav-container {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 22px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-violet) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
}

.nav-menu li a {
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary-violet);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* === HERO SECTION === */
.hero {
    height: var(--hero-height);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.95) 0%, rgba(126, 87, 194, 0.9) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="2" height="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 30px;
}

.hero h1 {
    color: white;
    -webkit-text-fill-color: white;
    background: none;
    font-size: 58px;
    margin-bottom: 25px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 35px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    min-width: 180px;
}

.hero-buttons .btn-white {
    background: white;
    color: var(--primary-violet);
}

.hero-buttons .btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.3);
}

/* === GRID LAYOUTS === */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
}

/* === CARD COMPONENTS === */
.card {
    background: white;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.card-icon.blue {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.1) 0%, rgba(126, 87, 194, 0.1) 100%);
    color: var(--primary-blue);
}

.card-icon.green {
    background: rgba(67, 160, 71, 0.1);
    color: var(--learning-green);
}

.card-icon.yellow {
    background: rgba(255, 193, 7, 0.1);
    color: #F9A825;
}

.card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.card p {
    font-size: 16px;
    color: var(--text-light);
}

/* === ACCORDION === */
.accordion {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.accordion-item {
    border-bottom: 1px solid #E0E0E0;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    background: white;
}

.accordion-header:hover {
    background: #F9F9F9;
}

.accordion-header.active {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.05) 0%, rgba(126, 87, 194, 0.05) 100%);
}

.accordion-title {
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.accordion-icon {
    font-size: 24px;
    color: var(--primary-blue);
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content-inner {
    padding: 0 30px 25px 30px;
}

/* === TABS === */
.tabs {
    margin-bottom: 40px;
}

.tab-buttons {
    display: flex;
    gap: 15px;
    border-bottom: 2px solid #E0E0E0;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 15px 30px;
    background: transparent;
    border: none;
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.tab-button:hover {
    color: var(--primary-blue);
}

.tab-button.active {
    color: var(--primary-violet);
    border-bottom-color: var(--primary-violet);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

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

/* === CAROUSEL === */
.carousel {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    padding: 0 10px;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--primary-violet);
    transform: scale(1.1);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #D0D0D0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary-violet);
    width: 30px;
    border-radius: 6px;
}

/* === TESTIMONIAL === */
.testimonial {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 700;
}

.testimonial-info h4 {
    font-size: 20px;
    margin-bottom: 5px;
}

.testimonial-info p {
    color: var(--text-light);
    font-size: 15px;
    margin: 0;
}

.testimonial-text {
    font-style: italic;
    line-height: 1.8;
    color: var(--text-medium);
}

/* === FORM ELEMENTS === */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-family: var(--font-title);
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 5px;
    width: 20px;
    height: 20px;
}

/* === BADGE === */
.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-family: var(--font-code);
    font-size: var(--caption-size);
    font-weight: 500;
}

.badge-blue {
    background: rgba(25, 118, 210, 0.1);
    color: var(--primary-blue);
}

.badge-violet {
    background: rgba(126, 87, 194, 0.1);
    color: var(--primary-violet);
}

.badge-green {
    background: rgba(67, 160, 71, 0.1);
    color: var(--learning-green);
}

.badge-yellow {
    background: rgba(255, 193, 7, 0.1);
    color: #F9A825;
}

/* === PROGRESS BAR === */
.progress-bar {
    width: 100%;
    height: 12px;
    background: #E0E0E0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-violet) 100%);
    transition: width 0.6s ease;
    border-radius: 6px;
}

/* === FOOTER === */
.footer {
    background: #212121;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

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

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

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* === COOKIE BANNER === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(33, 33, 33, 0.98);
    color: white;
    padding: 25px 30px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: none;
    animation: slideUp 0.4s ease;
}

.cookie-banner.show {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 10px;
}

.cookie-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
}

.cookie-text a {
    color: var(--inclusion-yellow);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
}

.cookie-btn-accept {
    background: var(--learning-green);
    color: white;
}

.cookie-btn-accept:hover {
    background: #388E3C;
}

.cookie-btn-reject {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.cookie-btn-reject:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

.cookie-btn-settings {
    background: transparent;
    border: 2px solid var(--inclusion-yellow);
    color: var(--inclusion-yellow);
}

.cookie-btn-settings:hover {
    background: var(--inclusion-yellow);
    color: #333;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
    .grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --title-size: 36px;
        --body-size: 16px;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 30px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero h1 {
        font-size: 42px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    h2 {
        font-size: 32px;
    }
    
    h3 {
        font-size: 24px;
    }

    /* Cookie banner responsive */
    .cookie-banner {
        padding: 20px 20px;
    }

    .cookie-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .card {
        padding: 25px;
    }
}