/* Estilos para la sección de Formación y Recursos */
html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

:root {
    --primary-color: #003366;
    /* Azul Oscuro Institucional */
    --secondary-color: #00509e;
    /* Azul más claro */
    --accent-color: #e6b800;
    /* Dorado/Amarillo para contrastes */
    --text-color: #333;
    --light-bg: #f4f6f9;
    --white: #ffffff;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
}

/* Header Simplificado */
.simple-header {
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo img {
    height: 60px;
    width: auto;
}

.back-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
}

.hero-section h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Contenedor Principal */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sección Descargas */
.downloads-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--accent-color);
}

.section-title {
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

/* Formulario de Registro */
.registration-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 1rem;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

/* File Browser & Navigation */
.navigation-controls {
    margin-bottom: 1.5rem;
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 5px 12px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #cbd5e1;
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.current-path {
    font-size: 0.85rem;
    color: #64748b;
    font-family: monospace;
    background: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px dashed #cbd5e1;
}

.search-container {
    margin-bottom: 2rem;
}

.search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.search-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.file-browser {
    background: transparent;
    border: none;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.folder-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
    overflow: hidden;
}

.folder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.folder-link {
    display: block;
    padding: 2rem 1rem;
    text-decoration: none;
    color: var(--text-color);
}

.folder-icon {
    font-size: 3.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: block;
}

.folder-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-color);
    word-break: break-word;
}

.loose-file .folder-icon {
    color: #666;
}

.no-files {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 8px;
    color: #666;
    font-style: italic;
}

.search-info {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }

    .downloads-section,
    .products-section {
        padding: 1.5rem 1rem;
    }

    .search-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .folder-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .folder-card {
        border-radius: 8px;
    }

    .folder-link {
        padding: 1.2rem 0.5rem;
    }

    .folder-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .folder-name {
        font-size: 0.85rem;
    }

    .navigation-controls {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start !important;
    }

    .current-path {
        word-break: break-all;
        width: 100%;
    }
}

/* Infoproductos */
.products-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.category-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 2.5rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-title:first-of-type {
    margin-top: 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
    justify-content: center;
}

.grid-2-cols {
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch;
}

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

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-image {
    height: 180px;
    background-color: #ddd;
    /* Placeholder */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 3rem;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-real {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.product-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.75rem;
}

.product-title {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
}

.product-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.product-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    background-color: #ea580c;
    color: white;
    text-decoration: none;
    padding: 12px 10px;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
}

.btn-buy:hover {
    background-color: #c2410c;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #16a34a;
    font-size: 0.85rem;
    padding: 10px 16px;
}

.btn-secondary:hover {
    background-color: #15803d;
}

.btn-discount {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    position: relative;
    overflow: hidden;
}

.btn-discount:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.btn-discount::before {
    content: "🎁";
    margin-right: 0.25rem;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc2626;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
    z-index: 10;
}

.product-guarantee {
    text-align: center;
    font-size: 0.75rem;
    color: #16a34a;
    font-weight: 600;
    margin-top: 0.25rem;
}

.btn-amazon {
    background-color: #232f3e;
    border: 1px solid #37475a;
}

.btn-amazon:hover {
    background-color: #131921;
}

.btn-amazon::before {
    content: "📚";
    margin-right: 0.25rem;
}

/* Contact Footer */
.contact-footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    margin-top: 3rem;
}

.contact-footer h3,
.contact-footer p {
    color: white;
}

.contact-footer h3 {
    margin: 0.5rem 0;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-contact {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

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