/* Global Styles */
:root {
    --primary-color: #0a192f;
    /* Deep Navy Blue */
    --secondary-color: #e63946;
    /* Accent Red */
    --text-color: #333;
    --light-bg: #f4f6f8;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    /* Remove native smooth scroll if we want to use custom JS for specific links */
    /* scroll-behavior: smooth; */
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
    visibility: hidden;
    /* prevents clicking on hidden elements */
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 55px;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white) !important;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary:hover {
    background-color: #c1121f;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(230, 57, 70, 0.3);
}

.btn-cta-main {
    font-size: 1.1rem;
    padding: 14px 35px;
}

/* Side Tab Navigation */
.side-tabs {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tab-item {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: var(--transition);
    border-radius: 8px 0 0 8px;
    min-width: 70px;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-item i {
    font-size: 1.3rem;
}

.tab-item span {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
}

.tab-item:hover,
.tab-item.active {
    background: var(--secondary-color);
    padding-right: 20px;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.8)), url('../../assets/img/ConexionCargoFondo.jpeg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero .highlight {
    color: var(--secondary-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.bg-light {
    background-color: var(--light-bg);
}

/* Services */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* Services Cards */
.card {
    background: var(--white);
    padding: 0;
    /* Remove padding to let image fill header */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Softer, deeper shadow */
    text-align: center;
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-image {
    height: 200px;
    background-position: center;
    background-size: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
    /* Zoom effect */
}

.card-content {
    padding: 30px;
    position: relative;
    background: var(--white);
    flex-grow: 1;
}

.card-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    margin-top: -50px;
    background: var(--white);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 700;
}

/* Fleet Cards (Visual) */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Larger cards */
    gap: 30px;
}

.fleet-card {
    position: relative;
    background: var(--white);
    padding: 0;
    border-radius: 15px;
    overflow: hidden;
    /* Ensure rounded corners clipping */
}

.fleet-image {
    height: 250px;
    width: 100%;
    background-position: center;
    background-size: cover;
    transition: transform 0.5s ease;
}

.fleet-card:hover .fleet-image {
    transform: scale(1.1);
}

.fleet-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: var(--white);
    text-align: left;
}

.fleet-info h3 {
    font-size: 1.3rem;
    color: var(--white);
    margin: 0;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Technology */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tech-item {
    text-align: center;
}

.tech-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    background: var(--white);
    padding: 20px;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.tech-item h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Locations */
.locations-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.location-item {
    text-align: center;
}

.location-item i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Contact */
.contact-section {
    background: linear-gradient(rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.9)), url('../../assets/img/ConexionCargoFondo.jpeg') center/cover fixed;
    color: var(--white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.btn-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background-color: #0d213f;
}

/* Footer */
footer {
    background-color: #050d1a;
    color: #888;
    text-align: center;
    padding: 20px 0;
}

/* Floating Contact Buttons */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 20px;
    /* Move left on desktop to avoid side tabs */
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 2000;
}

.btn-float {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy effect */
    text-decoration: none;
}

.btn-float:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    /* Vibrant WhatsApp Green */
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-phone {
    background: linear-gradient(135deg, #007bff, #0056b3);
    /* Vibrant Blue */
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Pulse Animation for WhatsApp to draw attention */
@keyframes pulse-float {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.btn-whatsapp {
    animation: pulse-float 2s infinite;
}

.btn-whatsapp:hover {
    animation: none;
    /* Stop pulse on hover to avoid conflict with hover transform */
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .side-tabs {
        bottom: 0;
        top: auto;
        right: 0;
        left: 0;
        transform: none;
        flex-direction: row;
        justify-content: space-around;
        background: var(--primary-color);
        padding: 8px 0;
        border-radius: 0;
    }

    .tab-item {
        border-radius: 8px;
        min-width: auto;
        padding: 10px 15px;
        box-shadow: none;
    }

    .tab-item:hover,
    .tab-item.active {
        padding: 10px 15px;
    }

    .tab-item span {
        font-size: 0.65rem;
    }

    .btn-cta-main {
        font-size: 0.8rem;
        padding: 8px 15px;
    }

    .logo img {
        height: 40px;
    }

    /* Adjust Hero for Mobile to make background image look "smaller" (less zoomed) */
    .hero {
        height: 60vh;
        /* Reduce height from 100vh */
        min-height: 500px;
        background-attachment: scroll;
        /* Ensure it scrolls on mobile */
    }

    /* Move Floating Buttons up to avoid covering the bottom Side Tabs */
    .floating-contact {
        bottom: 90px;
        right: 15px;
        /* Keep it close to edge on mobile */
    }
}



/* CTA Banner (Intermediate) */
.cta-banner {
    background: linear-gradient(135deg, rgba(10, 25, 47, 0.95), rgba(5, 13, 26, 0.95)), url('../../assets/img/imgFondo.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    padding: 80px 0;
    /* Increased padding for impact */
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.cta-text {
    text-align: left;
    flex: 1;
    min-width: 300px;
}

.cta-text h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cta-text p {
    font-size: 1.25rem;
    opacity: 1;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-cta-banner {
    background-color: var(--white);
    color: var(--primary-color);
    /* Navy Blue for text */
    padding: 16px 45px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cta-banner:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    background-color: #ffffff;
}

@media (max-width: 768px) {
    .cta-content {
        flex-direction: column;
        text-align: center;
    }

    .cta-text {
        text-align: center;
    }

    .cta-text h2 {
        font-size: 1.8rem;
    }
}

/* Interactive Locations */
.locations-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.locations-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.location-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.location-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 5px;
}

.loc-details h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.loc-details p {
    font-size: 0.95rem;
    color: #666;
}

.location-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.location-item.active {
    border-color: var(--secondary-color);
    background: #fff5f5;
    /* Very light red tint */
}

.map-container {
    height: 100%;
    min-height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

@media (max-width: 900px) {
    .locations-wrapper {
        grid-template-columns: 1fr;
    }

    .map-container {
        min-height: 300px;
    }
}

/* WhatsApp Tooltip */
.wa-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wa-tooltip {
    position: absolute;
    right: 100%;
    /* Position to the left of the container */
    top: 50%;
    margin-right: 15px;
    /* Space between tooltip and button */
    background: var(--white);
    color: var(--text-color);
    padding: 12px 20px;
    border-radius: 20px;
    /* Bubble shape */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transform: translate(20px, -50%) scale(0.9);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1001;
    border-bottom-right-radius: 5px;
    /* Chat bubble aesthetic */
}

.wa-tooltip.show {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
}

.wa-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    width: 12px;
    height: 12px;
    background: var(--white);
    transform: translateY(-50%) rotate(45deg);
    border-radius: 2px;
}