/* Commerce Transport - Freight Forwarder Ecuador */
/* Identidad visual: Azul oscuro, blanco/gris, acento cyan/turquesa */

:root {
    --primary: #0A4D68;
    --primary-light: #088395;
    --accent: #05BFDB;
    --accent-hover: #00D4FF;
    --dark: #001524;
    --light: #F8F9FA;
    --gray: #6C757D;
    --gray-light: #E9ECEF;
    --white: #FFFFFF;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 40px rgba(5, 191, 219, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== NAVEGACIÓN ===== */
/* Usar body > nav para que solo afecte al menú principal, no al nav del footer */
body > nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    overflow: visible;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo:hover {
    color: var(--primary-light);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links > li {
    position: relative;
}

.nav-links a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Dropdown Servicios */
.services-dropdown {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    min-width: 240px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    display: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1001;
}

.nav-links > li:hover .services-dropdown {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.services-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
}

.services-dropdown a:hover {
    background: var(--light);
}

.services-dropdown .icon {
    font-size: 1.2rem;
}

/* CTA en nav */
.nav-cta {
    background: var(--accent) !important;
    color: var(--dark) !important;
    border-radius: 8px;
    font-weight: 700;
}

.nav-cta:hover {
    background: var(--accent-hover) !important;
}

/* ===== HERO ===== */
.hero {
    min-height: 90vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 7rem 2rem 4rem;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(5, 191, 219, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    color: var(--white);
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

/* ===== BOTONES ===== */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--dark);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.cta-button-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.cta-button-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

/* ===== SECCIONES GENERALES ===== */
section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* ===== TARJETAS DE SERVICIO ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.service-card h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.service-card p {
    color: var(--gray);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===== BENEFICIOS ===== */
.benefits {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
}

.benefits .section-title,
.benefits .section-subtitle {
    color: var(--white);
}

.benefits .section-subtitle {
    opacity: 0.9;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.benefit-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.benefit-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.benefit-item p {
    opacity: 0.9;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===== PÁGINA INTERNA ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 8rem 2rem 4rem;
    text-align: center;
}

.page-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.content-section {
    padding: 4rem 2rem;
}

/* ===== FORMULARIOS ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ===== FOOTER ===== */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.footer-text {
    margin-bottom: 1.5rem;
    opacity: 0.85;
    font-size: 0.95rem;
}

.footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-nav a:hover {
    color: var(--accent);
}

/* ===== BLOG ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-card-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.blog-card .meta {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.75rem;
}

.blog-card p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== NOSOTROS / ABOUT ===== */
.about {
    background: var(--light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--dark);
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-light);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--gray);
    font-weight: 600;
}

.cta-section {
    background: var(--light);
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacto-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .contact-image-wrapper {
        min-height: 280px;
    }
}

/* ===== IMÁGENES TEMÁTICAS ===== */
.theme-image {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    border-radius: 12px;
}

.theme-image-container {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-image-wrapper {
    min-height: 350px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-image-wrapper img {
    width: 100%;
    height: 100%;
    min-height: 350px;
    object-fit: cover;
}

/* ===== MAPA / COBERTURA ===== */
.coverage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.coverage-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.coverage-card h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

/* ===== MENÚ MÓVIL LATERAL ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--primary);
    line-height: 1;
    z-index: 1003;
}

.mobile-menu-close {
    display: none;
}

/* Overlay del menú móvil - visible solo en móvil cuando menú abierto */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

/* Panel lateral del menú */
.mobile-menu-panel {
    display: flex;
    align-items: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .mobile-menu-btn {
        display: block !important;
    }

    .mobile-menu-overlay {
        display: block;
    }

    .mobile-menu-panel {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        background: var(--white);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding-top: 5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-bottom: 2rem;
        z-index: 1002;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }

    .mobile-menu-close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        font-size: 2rem;
        cursor: pointer;
        color: var(--gray);
        line-height: 1;
        padding: 0.25rem;
    }

    .mobile-menu-close:hover {
        color: var(--primary);
    }

    body.menu-open .mobile-menu-overlay {
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.menu-open .mobile-menu-panel {
        transform: translateX(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-links > li {
        border-bottom: 1px solid var(--gray-light);
    }

    .nav-links > li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        padding: 1rem 0;
        font-size: 1rem;
    }

    /* Dropdown de servicios en móvil: siempre visible */
    .services-dropdown {
        position: static;
        display: block !important;
        box-shadow: none;
        background: var(--light);
        border-radius: 8px;
        margin: 0.5rem 0 0.5rem 1rem;
        padding: 0.5rem 0;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .services-dropdown a {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    /* Evitar scroll del body cuando menú abierto */
    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    section {
        padding: 3rem 1rem;
    }

    .container {
        padding: 0 0.5rem;
    }

    .section-title {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero {
        min-height: 80vh;
        padding: 6rem 1rem 3rem;
    }

    .hero h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .cta-button {
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
    }

    .services-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 1.5rem;
    }

    .benefit-item {
        padding: 1.5rem;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .page-header {
        padding: 6rem 1rem 3rem;
    }

    .page-header h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .content-section {
        padding: 2.5rem 1rem;
    }

    .coverage-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .coverage-card {
        padding: 1.5rem;
    }

    .theme-image-container {
        margin-bottom: 1.5rem !important;
    }

    .theme-image {
        min-height: 220px;
    }

    .contact-image-wrapper {
        min-height: 250px;
    }

    .contact-image-wrapper img {
        min-height: 250px;
    }

    footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .footer-nav a {
        font-size: 0.9rem;
    }

    .footer-logo {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.5rem 0.75rem;
    }

    .logo {
        font-size: 1rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .mobile-menu-panel {
        width: 100%;
        max-width: 100%;
    }
}
