:root {
    --color-primary: #C80000; 
    --color-primary-dark: #950000;  
    --color-primary-light: #f55b5b; 
    
    --color-background: #ffffff;
    --color-surface: #f8f9fa;
    
    --color-text: #2c3e50;          
    --color-text-secondary: #7f8c8d;
    --color-border: #e0e0e0;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    --font-heading: 'Montserrat', 'Roboto', 'Arial', sans-serif; 
    --font-body: 'Poppins', 'Roboto', 'Arial', sans-serif;       
    --font-logo: 'Impact', 'Anton', sans-serif;                  
    --font-size-base: 16px;
    --line-height-base: 1.6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-body); 
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-background);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .section-title {
    font-family: var(--font-heading);
    font-weight: 800; 
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: var(--color-text); 
}

.hero h1, 
.hero h2, 
.hero p,
header h1, 
header h2, 
header p {
    color: #ffffff !important;
}

.hero-subtitle {
    color: #ffffff !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* BOTONES */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-background);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

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

.btn-full {
    width: 100%;
}

/* SECCIONES */
section {
    padding: var(--spacing-xl) 0;
}

.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 850px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}


/* boton wp */
.wa-button {
    position: fixed;
    bottom: 93px; 
    right: 25px;
    width: 50px;   
    height: 50px;
    border-radius: 50%;
    background-color: #25d366;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: waPulse 2.2s infinite ease-in-out;
}

.wa-button.show {
    opacity: 1;
    transform: translateY(0);
}

.wa-button i {
    font-size: 1.9rem; 
}

.wa-button:hover {
    background-color: #1ca14f;
    transform: scale(1.08);
}

.wa-modal {
    position: fixed;
    bottom: 150px;
    right: 15px;
    width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.wa-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wa-modal-header {
    background-color: #25d366;
    color: #fff;
    padding: 12px;
    border-radius: 10px 10px 0 0;
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
}

.wa-modal-header p {
    margin: 5px 0 0;
    font-weight: normal;
    font-size: 0.9rem;
}

.wa-modal-content {
    padding: 15px;
}

.wa-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.wa-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    color: #c0c0c0;
}

.wa-item:hover {
    background-color: #f9f9f9;
    transform: scale(1.02);
}

.wa-icon-left {
    color: #25d366;
    font-size: 1.8rem;
}

.wa-info {
    flex: 1;
}

.wa-modal .wa-info h4 {
    color: #1a1a1ab5 !important; 
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.wa-modal .wa-info p {
    color: #059668cb !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    margin: 2px 0 0 0 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.wa-modal .wa-info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.wa-modal .wa-item i:last-child {
    color: #6b7280 !important;
    font-size: 1.1rem !important;
}

/* BACK TO TOP BUTTON */
.back-to-top {
    position: fixed;
    bottom: 25px; 
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: none;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top i {
    font-size: 1.6rem;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--color-primary-light);
    transform: scale(1.05);
}

/* ==========================================================================
   PRELOADER INDUSTRIAL - SIMULADOR DE POZO & MANÓMETRO
   ========================================================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #060709; /* Negro acero profundo */
    background-image: 
        radial-gradient(circle at 50% 40%, rgba(200, 0, 0, 0.12) 0%, transparent 60%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.7s cubic-bezier(0.77, 0, 0.175, 1), 
                visibility 0.7s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

/* === MÓDULO CENTRAL DE POZO === */
.oil-rig-system {
    position: relative;
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Anillo Manómetro Industrial */
.pressure-gauge-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    animation: gaugeRotate 25s linear infinite;
}

/* Pistón Hidráulico de Presión */
.hydraulic-piston-ring {
    position: absolute;
    inset: 8px;
    border: 3px solid transparent;
    border-top: 3px solid #c80000;
    border-left: 3px solid #c80000;
    border-radius: 50%;
    animation: hydraulicStroke 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    filter: drop-shadow(0 0 8px rgba(200, 0, 0, 0.6));
}

/* Caja de Logo de Torres */
.loader-logo-box {
    width: 95px;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    background: radial-gradient(circle at 30% 30%, #1a1d24 0%, #08090b 80%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        inset 0 4px 10px rgba(0, 0, 0, 0.9),
        0 10px 25px rgba(0, 0, 0, 0.5);
}

.loader-logo {
    max-width: 55%;
    max-height: 55%;
    object-fit: contain;
    animation: rigStroke 2s ease-in-out infinite alternate;
}

/* Válvula de Salida Pulsante */
.valve-pulse {
    position: absolute;
    bottom: -5px;
    width: 10px;
    height: 10px;
    background-color: #c80000;
    border-radius: 50%;
    box-shadow: 0 0 12px #c80000;
    animation: valveBlink 1s ease-in-out infinite alternate;
}

/* === BARRA Y INDICADORES === */
.loader-text-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.rig-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(200, 0, 0, 0.08);
    border: 1px solid rgba(200, 0, 0, 0.25);
    padding: 6px 16px;
    border-radius: 20px;
}

.rig-status-badge i {
    color: #c80000;
    font-size: 0.85rem;
}

.loader-status {
    font-family: system-ui, -apple-system, sans-serif;
    color: #a0aab5;
    font-size: 0.72rem;
    letter-spacing: 2px;
    font-weight: 800;
    text-transform: uppercase;
}

/* Contenedor Riel Metálico */
.progress-bar-container {
    width: 240px;
    height: 8px;
    background: #0a0c10;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.9);
}

/* Llenado de Presión en la Barra */
.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #500000 0%, #c80000 70%, #ff3333 100%);
    box-shadow: 0 0 12px rgba(200, 0, 0, 0.8);
    transition: width 0.1s linear;
    position: relative;
    z-index: 2;
}

.loader-metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 240px;
    margin-top: 2px;
}

.psi-reading {
    font-family: 'Impact', sans-serif;
    color: #ffffff;
    font-size: 1.2rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.psi-reading i {
    font-size: 0.85rem;
    color: #c80000;
}

.rig-info {
    font-family: system-ui, monospace;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
}

/* === ANIMACIONES MECÁNICAS === */
@keyframes gaugeRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes hydraulicStroke {
    0% { transform: rotate(0deg) scale(0.98); }
    50% { transform: rotate(180deg) scale(1.03); }
    100% { transform: rotate(360deg) scale(0.98); }
}

@keyframes rigStroke {
    0% { transform: translateY(3px) scale(0.95); }
    100% { transform: translateY(-3px) scale(1.02); }
}

@keyframes valveBlink {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}