/* ==========================================================================
   CSS VARIABLES & DESIGN TOKENS
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-color: #0b0f19;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --accent-color: #10b981;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-family: 'Outfit', sans-serif;
    
    /* Effects */
    --glass-blur: blur(12px);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease;
}

/* ==========================================================================
   RESET & GLOBAL STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

ul {
    list-style: none;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.brand-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   SPA VIEWS
   ========================================================================== */
/* Result Cards and Success States */
.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
}

.iva-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.success-card {
    text-align: center;
    border-left: 4px solid #10b981 !important;
}

.success-icon {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.tracking-id-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px dashed var(--primary-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.tracking-id-box span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.tracking-id-box strong {
    font-size: 2rem;
    letter-spacing: 2px;
    color: var(--primary-color);
}

.small-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Form Row Helper */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Google Autocomplete Styles */
.pac-container {
    background-color: #1a1f2e; /* Color sólido y opaco */
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    margin-top: 5px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

.pac-item {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 12px 15px;
    color: #e2e8f0;
    cursor: pointer;
}

.pac-item:hover {
    background-color: #2d3748;
}

.pac-item-query {
    color: var(--primary-color);
    font-size: 14px;
}

.pac-icon {
    filter: invert(1); /* Ajustar iconos para tema oscuro */
}

.view {
    display: none;
    opacity: 0;
    animation: fadeIn 0.4s forwards;
    flex: 1;
}

.view.active-view {
    display: block;
}

main {
    flex: 1;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6rem 5%;
    min-height: 70vh;
    position: relative;
    overflow: hidden;
}

/* Background Decoration */
.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(0,0,0,0) 70%);
    top: -100px;
    right: -100px;
    z-index: -1;
    border-radius: 50%;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.cta-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.cta-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.van-mockup {
    width: 100%;
    max-width: 500px;
    height: 300px;
    background: linear-gradient(45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.1));
    border-radius: 20px;
    border: 1px solid var(--border-color);
    position: relative;
    /* Placeholder icon for Van */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
}
.van-mockup::after {
    content: "🚐";
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */
.services {
    padding: 5rem 5%;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 800;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    background: rgba(30, 41, 59, 0.9);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
}

/* ==========================================================================
   CONFIGURATOR SECTION
   ========================================================================== */
.page-header {
    text-align: center;
    padding: 4rem 5% 2rem;
}

.page-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

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

.config-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 0 5% 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.config-form-card, .config-result-card {
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.4);
}

.submit-button, .book-button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.submit-button:hover, .book-button:not(:disabled):hover {
    background: var(--primary-hover);
}

.book-button:disabled {
    background: #374151;
    color: #9ca3af;
    cursor: not-allowed;
}

.config-result-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.price-display {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.currency {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.price-breakdown {
    margin-bottom: 2rem;
}

.price-breakdown li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-muted);
}

/* ==========================================================================
   TRACKING SECTION
   ========================================================================== */
.tracking-container {
    padding: 0 5% 5rem;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tracking-search {
    display: flex;
    padding: 1.5rem;
    gap: 1rem;
}

.tracking-search input {
    flex: 1;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-family: var(--font-family);
    font-size: 1.1rem;
}

.tracking-search button {
    padding: 0 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.tracking-search button:hover {
    background: var(--primary-hover);
}

.tracking-map-area {
    height: 500px;
    width: 100%;
}

#map-mockup {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 15, 25, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.5s ease;
}

#map-status {
    font-size: 1.2rem;
    color: var(--text-muted);
}

#google-maps-container {
    width: 100%;
    height: 100%;
    background: #2a2a2a; /* Placeholder bg */
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--border-color);
    padding: 4rem 5% 2rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links h4 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .config-container {
        grid-template-columns: 1fr;
    }
    
    .tracking-search {
        flex-direction: column;
    }
    
    .tracking-search button {
        padding: 1rem;
    }
}
