/* =============================================
   TÉRMINOS Y CONDICIONES - MICTLÁN TEAM
   Estilos basados en main.css y calculadora.css
   ============================================= */

/* ==================== BASE ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Paleta Mictlán compartida con la app — origen: assets/css/main.css */
    --gold: #D4A947;
    --gold-dark: #A8842F;
    --gold-rgb: 212, 169, 71;
    --red: #D32F2F;
    --red-dark: #B71C1C;
    --red-light: #EC6A70;
    --red-rgb: 211, 47, 47;
    --purple: #7C5CBF;
    --purple-light: #A88CE0;
    --purple-rgb: 124, 92, 191;
    --bg-dark: #0D0B14;
    --bg-darker: #08060E;
    --bg-card: #161320;
    --bg-elevated: #1E1A2C;
    /* Alias histórico usado en estilos inline (texto oscuro sobre dorado). */
    --bg-primary: #0D0B14;
    --text-primary: #E9E5F2;
    --text-secondary: #B3ACC7;
    --text-muted: #8B84A3;
    --success: #5FD37A;
    --warning: #FF9800;
    --error: #F4787E;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    padding: 20px;
}

/* Background Grid Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(var(--gold-rgb), 0.03) 1px, transparent 1px),
        linear-gradient(rgba(var(--gold-rgb), 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.5;
}

/* ==================== CONTAINER ==================== */

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid rgba(var(--gold-rgb), 0.2);
    animation: fadeIn 0.6s ease;
}

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

/* ==================== HEADER ==================== */

.header {
    background: linear-gradient(135deg, var(--gold), var(--red), var(--purple));
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
}

.header img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

.header p {
    font-size: 1.1em;
    opacity: 0.95;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* ==================== CONTENT ==================== */

.content {
    padding: 40px 30px;
}

/* ==================== SECTIONS ==================== */

.section {
    margin-bottom: 35px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--gold);
    font-size: 1.5em;
    font-weight: 800;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h3 {
    color: var(--red-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2em;
    font-weight: 700;
    margin: 20px 0 10px 0;
}

.icon {
    font-size: 1.5em;
}

/* ==================== TERM ITEMS ==================== */

.term-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 10px;
    border-left: 4px solid var(--gold);
    transition: all 0.3s ease;
    border: 1px solid rgba(var(--gold-rgb), 0.2);
}

.term-item:hover {
    background: rgba(var(--gold-rgb), 0.08);
    transform: translateX(8px);
    border-color: var(--gold);
    box-shadow: 0 5px 20px rgba(var(--gold-rgb), 0.2);
}

.term-item strong {
    color: var(--gold);
    display: block;
    margin-bottom: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05em;
    font-weight: 700;
}

.term-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.term-item ul {
    margin: 10px 0 0 20px;
    color: var(--text-secondary);
}

.term-item ul li {
    margin: 5px 0;
    padding-left: 5px;
}

/* ==================== HIGHLIGHT BOX ==================== */

.highlight {
    background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.1), rgba(var(--red-rgb), 0.1));
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--gold);
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--gold), var(--red));
}

.highlight h3 {
    color: var(--gold);
    margin-top: 0;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    margin-bottom: 10px;
}

.highlight p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== LAST UPDATED ==================== */

.last-updated {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9em;
    padding: 20px 0;
    border-top: 1px solid rgba(var(--gold-rgb), 0.1);
    margin-top: 20px;
}

.last-updated strong {
    color: var(--gold);
}

/* ==================== FOOTER ==================== */

.footer {
    background: var(--bg-darker);
    padding: 30px;
    text-align: center;
    color: var(--text-secondary);
    border-top: 3px solid var(--gold);
}

.footer h3 {
    color: var(--gold);
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.footer p {
    margin: 10px 0;
    color: var(--text-secondary);
}

/* ==================== CONTACT INFO ==================== */

.contact-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(var(--gold-rgb), 0.2);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(var(--gold-rgb), 0.1);
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--gold-rgb), 0.3);
}

.contact-item .icon {
    font-size: 1.3em;
}

.contact-item span:not(.icon) {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==================== BACK BUTTON ==================== */

.back-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-darker);
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    margin: 20px 0;
    transition: all 0.3s ease;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 4px 20px rgba(var(--gold-rgb), 0.3);
    position: relative;
    overflow: hidden;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.back-btn:hover {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(var(--gold-rgb), 0.6);
}

.back-btn:hover::before {
    left: 100%;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 15px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .header img {
        width: 60px;
        height: 60px;
    }

    .content {
        padding: 25px 20px;
    }

    .section h2 {
        font-size: 1.3em;
    }

    .contact-info {
        flex-direction: column;
        gap: 15px;
    }

    .contact-item {
        width: 100%;
        justify-content: center;
    }

    .term-item {
        padding: 12px 15px;
    }

    .highlight {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.3em;
    }

    .header p {
        font-size: 0.95em;
    }

    .section h2 {
        font-size: 1.2em;
    }

    .content {
        padding: 20px 15px;
    }
}

/* ==================== SCROLLBAR ==================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold), var(--red));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-dark), var(--red-dark));
}
