/* ==========================================================================
   Variables Globales
   ========================================================================== */
:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #475569;
    --accent-primary: #0ea5e9;
    --accent-primary-light: #e0f2fe;
    --accent-success: #10b981;
    --accent-success-light: #d1fae5;
    --accent-warning: #f59e0b;
    --accent-warning-light: #fef3c7;
    --accent-danger: #ef4444;
    --accent-danger-light: #fee2e2;
    --border-color: #e2e8f0;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* ==========================================================================
   Reset y Estilos Base
   ========================================================================== */
html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

h1,
h2,
h3,
h4 {
    color: #0f172a;
    line-height: 1.2;
    margin-top: 0;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Contenedores Principales
   ========================================================================== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.header-section {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.header-section h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.header-section p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Manejo de Imágenes (Responsive y Flexbox)
   ========================================================================== */
.img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f1f5f9;
}

.img-responsive {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    /* Evita que se deformen */
    display: block;
}

/* ==========================================================================
   Tarjetas (Cards)
   ========================================================================== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   Grid y Flex Layouts
   ========================================================================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

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

.flex-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==========================================================================
   Insignias (Badges)
   ========================================================================== */
.badge {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    width: fit-content;
}

.badge-success {
    background-color: var(--accent-success-light);
    color: var(--accent-success);
}

.badge-warning {
    background-color: var(--accent-warning-light);
    color: var(--accent-warning);
}

.badge-danger {
    background-color: var(--accent-danger-light);
    color: var(--accent-danger);
}

.badge-primary {
    background-color: var(--accent-primary-light);
    color: var(--accent-primary);
}

/* ==========================================================================
   Tablas de Costos
   ========================================================================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
}

th,
td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #334155;
}

tr:last-child td {
    border-bottom: none;
}

.total-row {
    font-weight: 800;
    font-size: 1.1rem;
    background-color: var(--accent-primary-light);
    color: var(--accent-primary);
}

/* ==========================================================================
   Secciones de Información (Logística, Info Viaje)
   ========================================================================== */
.info-box {
    background-color: #f8fafc;
    border-left: 4px solid var(--accent-primary);
    padding: 20px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 20px;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
}