/* Sección principal */
.formula-section {
    padding: 3rem 0 4.5rem;
    background: #f6f8fb;
}

.formula-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(38, 186, 165, 0.12), rgba(55, 95, 122, 0.08));
    border: 1px solid rgba(55, 95, 122, 0.15);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
    margin-bottom: 2.5rem;
}

.formula-hero-text h1 {
    font-size: 2.6rem;
    color: #375F7A;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.formula-eyebrow {
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 600;
    color: #26BAA5;
    margin-bottom: 0.5rem;
}

.formula-subtitle {
    font-size: 1.1rem;
    color: rgba(55, 95, 122, 0.85);
    max-width: 520px;
    margin-bottom: 1.5rem;
}

.formula-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.formula-stats .stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: #375F7A;
}

.formula-stats .stat-label {
    font-size: 0.95rem;
    color: rgba(55, 95, 122, 0.7);
}

.formula-hero-actions {
    display: flex;
    align-items: center;
}

.formula-download {
    background: #26BAA5;
    color: #fff;
    padding: 0.9rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(38, 186, 165, 0.25);
    transition: all 0.3s ease;
}

.formula-download:hover {
    background: #375F7A;
    color: #fff;
    transform: translateY(-2px);
}

/* Grid de fórmulas */
.formula-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.formula-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(55, 95, 122, 0.12);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.45s ease both;
}

.formula-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    border-color: rgba(38, 186, 165, 0.45);
}

.formula-header {
    padding: 0.9rem 1.1rem;
    background: linear-gradient(135deg, #375F7A, rgba(55, 95, 122, 0.85));
    color: #ffffff;
}

.formula-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.formula-body {
    padding: 1rem 1.2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    min-height: 180px;
}

.formula-image {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.formula-footer {
    padding: 1rem 1.2rem 1.3rem;
    background: #f8fafc;
    text-align: left;
}

.formula-content {
    font-family: 'Inter', 'Times New Roman', serif;
    font-size: 0.98rem;
    margin-bottom: 0.9rem;
    color: #375F7A;
    max-height: 120px;
    overflow-y: auto;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    background: rgba(38, 186, 165, 0.15);
    color: #26BAA5;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.25s ease;
    font-size: 0.9rem;
}

.download-btn:hover {
    background: #26BAA5;
    color: #ffffff;
}

.formula-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 0 1.2rem 1.1rem;
}

.action-btn {
    color: rgba(55, 95, 122, 0.8);
    background: rgba(55, 95, 122, 0.08);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.action-btn:hover {
    color: #ffffff;
    background: #26BAA5;
    transform: translateY(-2px);
}

.action-btn.edit:hover {
    background: #375F7A;
}

.action-btn.delete:hover {
    background: #375F7A;
}

.action-btn.add:hover {
    background: #26BAA5;
}


/**
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Responsive adjustments
 */

 /* Contenedor principal del encabezado */
.main-header {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    color: #375F7A;
    padding: 16px 0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(55, 95, 122, 0.08);
}

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

/* Logo y lema */
.logo-section {
    display: flex;
    flex-direction: column;
}

.logo-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #26BAA5;
}

.tagline {
    font-size: 0.95rem;
    color: rgba(55, 95, 122, 0.75);
}

/* Navegación */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
}

.nav-links a {
    color: #375F7A;
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    text-decoration: none;
    color: #26BAA5;
}

/* Botón hamburguesa */
.menu-toggle {
    background: none;
    border: none;
    display: none;
}

.hamburger {
    width: 25px;
    height: 2px;
    background-color: #375F7A;
    display: block;
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    width: 25px;
    height: 2px;
    background-color: #375F7A;
    transition: 0.3s;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Breadcrumb */
.breadcrumb-container {
    background-color: #f8fafc;
    padding: 10px 0;
    font-size: 0.9rem;
}

.breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 5px;
}

.breadcrumb li::after {
    content: ">";
    margin: 0 8px;
    color: #7f8c8d;
}

.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb a {
    text-decoration: none;
    color: #26BAA5;
}

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

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

@media (max-width: 992px) {
    .formula-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .formula-hero-text h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .formula-section {
        padding: 2.5rem 0 3.5rem;
    }

    .formula-hero {
        padding: 1.6rem;
    }

    .formula-hero-actions {
        width: 100%;
    }

    .formula-download {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .formula-hero-text h1 {
        font-size: 2rem;
    }

    .formula-subtitle {
        font-size: 1rem;
    }
}

/* Sección de título del tema */
.formula-topic-section {
    margin-top: 30px;
}

.topic-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
}

.topic-header {
    background-color: #34495e;
    padding: 10px;
    border-radius: 5px 5px 0 0;
}

.topic-title {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}
