@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&display=swap');

:root {
    --primary-color: #1e293b; /* Deep Slate */
    --accent-color: #15803d;  /* Forest Green */
    --dark-bg: #0f172a;       /* Slate Dark */
    --light-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #4b5563;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    background: #ffffff;
}

/* Navbar Logo Branding - Enhanced for MDA */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color) !important;
}

.navbar-brand img {
    height: 90px;
    width: auto;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Logo en Navbar (Fondo Claro) */
nav .navbar-brand img {
    mix-blend-mode: multiply; /* Oculta fondo blanco */
}

.navbar-brand span {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid rgba(0,0,0,0.1);
    padding-left: 15px;
    margin-left: 5px;
}

.navbar-brand .tagline {
    font-size: 0.9rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    line-height: 1.4;
}

.navbar-brand:hover img {
    transform: scale(1.05) rotate(-1deg);
}

/* Logo en Footer (Fondo Oscuro) */
.logo-white {
    filter: invert(1) hue-rotate(180deg) brightness(1.8) contrast(2) saturate(1.4);
    mix-blend-mode: screen !important; /* Forza la transparencia del fondo negro */
    opacity: 1;
}

footer .navbar-brand {
    color: #ffffff !important;
}

footer .navbar-brand span em {
    color: rgba(255, 255, 255, 0.6);
}

/* Page Wrapper */
/* Vertical Chile Map - Clean & Full Silhouette (No Text) */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    right: 0;
    width: 50vw; /* Increased width significantly for massive presence */
    height: 100vh; /* Spans full viewport height */
    transform: translateY(-50%);
    background-image: url('hero_side.png');
    background-size: contain; 
    background-position: center right;
    background-repeat: no-repeat;
    opacity: 0.6; /* Higher opacity for clear visibility */
    z-index: -10;
    pointer-events: none;
    filter: drop-shadow(-10px 0 20px rgba(0,0,0,0.1));
}

/* Page Wrapper */
.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Protection for text readability - More subtle for subpages to see background images */
.page-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 40%, rgba(255,255,255,0) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Service Page Specific Backgrounds */
.bg-service-sig::after,
.bg-service-rep::after,
.bg-service-logistic::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -15;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    filter: saturate(0.5);
}

.bg-service-sig     { --service-color: #2563eb; --service-color-rgb: 37, 99, 235; }
.bg-service-rep     { --service-color: #15803d; --service-color-rgb: 21, 128, 61; }
.bg-service-logistic { --service-color: #64748b; --service-color-rgb: 100, 116, 139; }

.bg-service-sig::after { background-image: url('bg_premium_sig.png'); opacity: 0.35; }
.bg-service-rep::after { background-image: url('bg_premium_rep.png'); opacity: 0.35; }
.bg-service-logistic::after { background-image: url('bg_premium_logistic.png'); opacity: 0.35; }

section, header, footer {
    background: transparent !important; /* Ensure nothing hides the map or bg images */
}

/* Bottom fade to contact section */
.page-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(to bottom, transparent, #0f172a);
    z-index: -1;
}

@media (max-width: 991px) {
    .map-bg {
        width: 100%;
        opacity: 0.2;
    }
}

/* Remove old page-wrapper styles to avoid conflict */

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand span {
    color: var(--accent-color);
}

.nav-link {
    font-weight: 600;
    color: var(--text-main) !important;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

/* Hero Section: Text focused */
.hero {
    min-height: 80vh;
    padding-top: 140px;
    display: flex;
    align-items: center;
    background: transparent;
}

.hero h1 {
    font-weight: 800;
    letter-spacing: -2px;
    color: var(--text-main);
}

.highlight {
    color: var(--service-color, var(--accent-color));
}

/* Services */
#servicios {
    padding: 100px 0;
}

.card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 16px !important;
    padding: 2.5rem !important;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color) !important;
}

.icon-img {
    width: 64px;
    height: 64px;
    mix-blend-mode: multiply;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.card:hover .icon-img {
    filter: grayscale(0%);
}

/* Experience */
.experience-section {
    padding: 100px 0;
}

.experience-section h2 {
    color: var(--text-main);
    font-weight: 800;
}

.experience-section p.lead {
    color: var(--text-muted);
}

.experience-img {
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* CTA: Ultra-Compact & Professional */
.cta-box {
    background: linear-gradient(135deg, #0f172a 0%, var(--service-color, #15803d) 100%);
    border-radius: 16px;
    padding: 2rem; /* Significantly reduced from 5rem 3rem */
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
    max-width: 600px; /* Minimalist width */
    margin: 20px auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.cta-box h2 {
    font-size: 1.5rem; /* Executive, smaller scale */
    font-weight: 700;
}

.cta-box p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem !important;
}

/* CTA Section - Minimized */
.cta-box .btn-light {
    background: #ffffff !important;
    color: var(--service-color, var(--accent-color)) !important;
    font-weight: 700 !important;
    padding: 8px 18px !important; /* Miniature scale */
    border-radius: 50px !important;
    border: none !important;
    font-size: 13px !important;
    display: inline-block !important;
    width: auto !important;
    transition: all 0.3s ease;
}

.cta-box .btn-light:hover {
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Footer - Clean Light Mode for Clarity */
footer {
    background: #f8fafc;
    color: var(--text-muted); 
    padding: 80px 0 40px;
    border-top: 1px solid #e2e8f0;
}

footer .navbar-brand {
    color: var(--text-main) !important;
    font-size: 1.25rem;
}

footer .navbar-brand span {
    color: var(--accent-color);
}

footer h5 {
    color: var(--text-main) !important;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

footer p {
    color: var(--text-main) !important;
    font-size: 0.9rem;
}

footer .opacity-50 {
    opacity: 0.8 !important; /* increased for readability */
}

footer hr {
    border-color: #e2e8f0;
    opacity: 1;
}

/* Ensure the contact section transitions well into the light footer */
.cta-box {
    margin-bottom: 60px; /* Space between dark CTA and light footer */
}

@media (max-width: 768px) {
    .hero {
        padding-top: 100px;
        text-align: center;
    }
}

/* Capability Cards for Service Pages */
.capability-card {
    background: rgba(255, 255, 255, 0.85); /* Slightly more opaque */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--service-color-rgb, 21, 128, 61), 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
}

.capability-card:hover {
    transform: translateY(-5px);
    border-color: var(--service-color, var(--accent-color));
    box-shadow: 0 10px 30px -5px rgba(var(--service-color-rgb, 21, 128, 61), 0.15);
}

.capability-card h5 {
    color: var(--service-color, var(--accent-color));
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.capability-card h5 i {
    width: 20px;
    height: 20px;
}

.capability-card h5::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--service-color, var(--accent-color));
    border-radius: 2px;
}

.capability-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
}
/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    background-color: #128c7e;
    color: #FFF;
}

/* Social Links Footer */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    color: #ffffff;
}
