/* ===================================================================
   CONTRATO MAESTRO DE DISTRIBUCIÓN - DRAIKOTUNE MUSIC DISTRIBUTION
   Diseño: Apu Agency - Erick Jaico
   
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Playfair+Display:ital,wght@0,700;1,700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --primary-black: #0a0a0a;
    --legal-blue: #1a2b3c;
    --gold-accent: #9a8150;
    --danger-red: #8b0000;
    --paper-white: #ffffff;
    --sidebar-gray: #fcfcfc;
    --border-soft: #e5e7eb;
    --text-main: #2c3e50;
    --shadow-legal: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* --- RESET Y RENDERIZADO --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #f3f4f6;
    font-family: 'Inter', sans-serif;
    color: var(--primary-black);
    padding: 80px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- CONTENEDOR MAESTRO --- */
.contract-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contract-container {
    width: 850px;
    background-color: var(--paper-white);
    box-shadow: var(--shadow-legal);
    position: relative;
    border: 1px solid var(--border-soft);
}

/* --- SISTEMA DE PÁGINAS MODERNAS --- */
.page {
    width: 100%;
    min-height: 1120px;
    padding: 90px 85px;
    background-color: var(--paper-white);
    position: relative;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
}

/* Marca de Agua Minimalista */
.page::before {
    content: "DRAIKOTUNE";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 110px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.012);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
}

/* --- ENCABEZADO TÉCNICO --- */
.page-header {
    border-bottom: 2px solid var(--primary-black);
    margin-bottom: 50px;
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--legal-blue);
}

.document-ref {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--gold-accent);
    letter-spacing: 1px;
}

/* --- TÍTULOS Y SECCIONES --- */
.main-title {
    font-family: 'Playfair Display', serif;
    font-size: 34px;
    line-height: 1.1;
    text-align: left;
    margin-bottom: 30px;
    color: var(--primary-black);
}

.section-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--gold-accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 50px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-soft);
    margin-left: 15px;
}

/* --- CUERPO DEL TEXTO --- */
.paragraph {
    font-family: 'Georgia', serif;
    font-size: 15.5px;
    line-height: 1.85;
    margin-bottom: 25px;
    text-align: justify;
    color: var(--text-main);
}

.legal-emphasis {
    font-weight: 700;
    color: var(--primary-black);
    text-decoration: underline;
    text-decoration-color: var(--gold-accent);
}

/* --- BLOQUES DE SEGURIDAD --- */
.strict-clause {
    background-color: var(--sidebar-gray);
    border: 1px solid var(--border-soft);
    padding: 35px;
    margin: 30px 0;
    border-left: 5px solid var(--primary-black);
}

.severe-warning {
    background: #fffafa;
    border: 1px solid var(--danger-red);
    padding: 40px;
    margin: 50px 0;
}

.severe-warning h2 {
    color: var(--danger-red);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
}

/* --- FOOTER Y PAGINACIÓN --- */
.page-footer {
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- BANNER DE ACEPTACIÓN MODERNO --- */
.acceptance-box {
    background: var(--primary-black);
    color: white;
    padding: 50px;
    text-align: center;
    margin-top: 40px;
}

.acceptance-box strong {
    font-size: 14px;
    letter-spacing: 3px;
    color: var(--gold-accent);
    display: block;
    margin-bottom: 15px;
}

/* --- OPTIMIZACIÓN DE IMPRESIÓN --- */
@media print {
    body { background: white; padding: 0; }
    .contract-container { width: 100%; box-shadow: none; border: none; }
    .page { page-break-after: always; min-height: auto; border: none; }
    .page::after { display: none; }
}

/* ===================================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATION
   =================================================================== */

@media screen and (max-width: 768px) {
    /* Ajuste del cuerpo para eliminar el fondo gris en móviles */
    body {
        padding: 0;
        background-color: #ffffff;
    }

    /* El contenedor ahora ocupa todo el ancho de la pantalla */
    .contract-wrapper, 
    .contract-container {
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border: none;
    }

    /* Ajuste de márgenes internos de la página */
    .page {
        width: 100% !important;
        min-height: auto;
        padding: 40px 20px !important; /* Margen cómodo para lectura */
        margin: 0;
        box-shadow: none;
    }

    /* Reducción de títulos para que no se corten */
    .company-name {
        font-size: 1.4rem !important;
        line-height: 1.2;
    }

    .main-title {
        font-size: 1.5rem !important;
    }

    .section-title {
        font-size: 1.2rem !important;
        padding-bottom: 5px;
    }

    /* Optimización de párrafos y listas */
    .paragraph, 
    .definition-description,
    .service-description {
        font-size: 0.95rem !important;
        text-align: left; /* Mejor legibilidad en pantallas pequeñas */
        line-height: 1.6;
    }

    /* Ajuste de las cajas de avisos importantes */
    .important-notice {
        padding: 15px !important;
        margin: 15px 0 !important;
    }

    /* Estilo para las firmas en móvil */
    .final-signature-section {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .signature-line {
        width: 100% !important;
    }

    /* Ocultar marca de agua en móviles si estorba la lectura */
    .page::before {
        display: none;
    }
}

/* ===================================================================
   PRINT OPTIMIZATION (Para que se vea bien al generar PDF)
   =================================================================== */

@media print {
    body {
        background: white;
    }
    .page {
        margin: 0;
        box-shadow: none;
        page-break-after: always;
        width: 210mm; /* A4 */
    }
    .contract-container {
        box-shadow: none;
    }
}

.contract-container {
    /* Deshabilita la selección de texto en todos los navegadores modernos */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none;     /* Internet Explorer/Edge */
    user-select: none;         /* Estándar (Chrome, Firefox) */
}

