/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 40px;
}

body {
    background-color: #F4F7FB;
    color: #4D4D4D;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 4rem 0;
}

section[id] {
    scroll-margin-top: 40px;
}

h1, h2, h3, h4, h5, h6 {
    color: #1A1A1A;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
}

p {
    margin-bottom: 1rem;
}

.container > p {
    text-align: center;
    margin-bottom: 2rem;
}

div {
    word-break: break-word;
    overflow-wrap: break-word;
}

a {
    text-decoration: none;
    color: #0057D9;
    transition: color 0.3s ease;
}

a:hover {
    color: #003EA6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn {
    display: block;
    margin: auto;
    max-width: max-content;
    background-color: #0057D9;
    color: #fff;
    padding: 12px 24px;
    border-radius: 5px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #003EA6;
    color: #fff;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1A1A1A;
}

/* Menú de navegación */
.menu-checkbox {
    display: none;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 20px;
}

nav ul li a {
    color: #4D4D4D;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #0057D9;
}

/* Hero Section */
.hero {
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    margin: 0 auto;
    text-align: center;
    max-width: 800px;
}

.hero h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Grid para cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card h3 {
    color: #1A1A1A;
    margin-bottom: 10px;
}

/* Sobre el curso */
.sobre-curso {
    background-color: #fff;
}

/* Ejemplos de código */
.code-examples {
    display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 20px;
}
.code-example {
    background-color: #1A1A1A;
    border-radius: 5px;
    padding: 20px;
    margin: 2rem 0;
    overflow-x: auto;
}

.code-example pre {
    color: #fff;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

/* FAQ Section */
.faq-item {
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.faq-checkbox {
    display: none;
}

.faq-question {
    background-color: #fff;
    padding: 15px;
    display: block;
    cursor: pointer;
    position: relative;
    font-weight: 600;
    border-radius: 5px;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 15px;
    transition: transform 0.3s ease;
}

.faq-answer {
    background-color: #f8f8f8;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-content {
    padding: 15px;
}

.faq-checkbox:checked ~ .faq-answer {
    max-height: 500px;
}

.faq-checkbox:checked ~ .faq-question::after {
    transform: rotate(45deg);
}

/* Formulario */
.form-section {
    background-color: #fff;
}

form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

select {
    height: 42px;
}

option {
    color: black;
    background-color: white;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.checkbox-group input {
    width: auto;
    margin-right: 10px;
    margin-top: 4px;
}

/* Página de gracias */
.thanks-section {
    min-height: 100vh;
    display: grid;
    align-items: center;
}

.thanks-content {
    margin: 5rem auto;
    border: 1px solid #ccc;
    text-align: center;
    padding: 3rem;
    border-radius: 10px;
    background-color: #fff;
}

/* Footer */
footer {
    background-color: #0A0A0A;
    color: #fff;
    padding: 3rem 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
}

.footer-section ul li a:hover {
    color: #00C9A7;
}

.footer-bottom {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1A1A1A;
    color: #fff;
    padding: 15px 0;
    z-index: 1001;
    display: none;
    min-width: 300px;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-text {
    flex: 1;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.accept-cookie {
    background-color: #00C9A7;
    color: #fff;
    border: none;
}

.reject-cookie {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
}

/* Página de políticas */
.policy-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.policy-content h1 {
    text-align: center;
    font-size: 2.5rem;
}
/* Media Queries */
@media (max-width: 768px) {
    .policy-content h1 {
        font-size: 1.8rem;
    }
    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    nav ul {
        flex-direction: column;
        padding: 20px 0;
        gap: 5px;
    }

    .menu-checkbox:checked ~ nav {
        max-height: 100vh;
        height: 100vh;
    }

    body:has(#menu-toggle:checked) {
        overflow: hidden;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .thanks-section {
        height: auto;
    }
}
