/* Terms and Legal Pages Styles */
.terms-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
}

.terms-nav {
    position: sticky;
    top: 2rem;
    height: fit-content;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.terms-nav h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #ffcc00;
    padding-bottom: 0.5rem;
}

.terms-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terms-nav li {
    margin-bottom: 0.5rem;
}

.terms-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.terms-nav a:hover {
    background: #f8f9fa;
    color: #ff9900;
}

.terms-nav a.active {
    background: #ffcc00;
    color: #333;
}

.terms-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.terms-section {
    display: none;
    padding: 2.5rem;
}

.terms-section.active {
    display: block;
}

.terms-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.terms-header h1 {
    color: #333;
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 600;
}

.last-updated {
    color: #666;
    font-style: italic;
    margin: 0;
}

.terms-text {
    line-height: 1.7;
    color: #444;
}

.terms-text h3 {
    color: #333;
    margin: 2rem 0 1rem 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.terms-text h4 {
    color: #333;
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.terms-text p {
    margin-bottom: 1rem;
    text-align: justify;
}

.terms-text ul {
    margin: 1rem 0 1.5rem 1.5rem;
}

.terms-text li {
    margin-bottom: 0.5rem;
    color: #555;
}

.terms-text a {
    color: #ff9900;
    text-decoration: none;
}

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

/* Responsive Design - MEJORADO */
@media (max-width: 768px) {
    .terms-container {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 1rem;
    }
    
    .terms-nav {
        position: static;
        order: 1; /* Aparece primero, justo después del header */
        margin-bottom: 1.5rem;
        padding: 1rem;
        border-radius: 8px 8px 0 0;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .terms-nav h2 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        text-align: center;
    }
    
    .terms-nav ul {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .terms-nav li {
        margin-bottom: 0;
    }
    
    .terms-nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .terms-content {
        order: 2; /* Aparece después del nav */
        border-radius: 0 0 8px 8px;
        margin-top: -1px; /* Para unir visualmente con el nav */
    }
    
    .terms-section {
        padding: 1.5rem;
    }
    
    .terms-header h1 {
        font-size: 2rem;
    }
    
    .terms-text {
        font-size: 0.95rem;
    }
    
    .terms-text h3 {
        font-size: 1.2rem;
        margin: 1.5rem 0 0.75rem 0;
    }
    
    .terms-text h4 {
        font-size: 1.05rem;
        margin: 1.25rem 0 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .terms-container {
        padding: 0.5rem;
    }
    
    .terms-nav {
        padding: 0.75rem;
    }
    
    .terms-nav h2 {
        font-size: 1rem;
    }
    
    .terms-nav a {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .terms-section {
        padding: 1rem;
    }
    
    .terms-header h1 {
        font-size: 1.75rem;
    }
    
    .terms-text {
        font-size: 0.9rem;
    }
    
    .terms-text ul {
        margin-left: 1rem;
    }
}

/* Print Styles */
@media print {
    .terms-nav {
        display: none;
    }
    
    .terms-container {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .terms-section {
        display: block !important;
        page-break-after: always;
        padding: 0;
    }
    
    .terms-section:last-child {
        page-break-after: auto;
    }
    
    .terms-header {
        margin-bottom: 1rem;
    }
    
    .terms-text {
        color: black;
    }
}