/* Logos móviles ocultos SIEMPRE en escritorio */
.logos-mobile-top,
.logos-mobile-bottom {
    display: none !important;
}

/* ===== VARIABLES Y RESET ===== */
:root {
    --color-primary: #7D0A0A;
    --color-secondary: #BF3131;
    --color-accent: #EAD196;
    --color-light: #EEEEEE;
    --color-gold: #C79E6A;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.centered {
    text-align: center;
}

.text-center {
    text-align: center;
}

.mt-40 {
    margin-top: 40px;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 150px !important;
    height: auto !important;
    object-fit: contain !important;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-menu a {
    color: #333;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: ' \25BC';
    font-size: 10px;
    margin-left: 4px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 12px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    transition: background var(--transition);
}

.dropdown-menu a:hover {
    background: var(--color-accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-btn {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition);
}

.lang-btn:hover {
    background: var(--color-secondary);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    transition: transform var(--transition);
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.95;
}

.hero-cta {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: 16px 40px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 18px;
    transition: background var(--transition), transform var(--transition);
}

.hero-cta:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
.nosotros-section,
.testimonials-section,
.services-preview-section,
.services-detail-section,
.personal-cargo-info,
.form-section,
.gallery-section,
.terms-section {
    padding: 30px 0;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 32px;
}

.section-text {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
}

/* ===== NOSOTROS ===== */
.nosotros-section {
    background: var(--color-light);
}

.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.nosotros-image img,
.section-img {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    width: 100%;
    height: auto;
}

/* ===== TESTIMONIALS ===== */
.testimonials-section {
    background: #fff;
}

.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 60px;
}

.testimonials-wrapper {
    position: relative;
    overflow: hidden;
}

.testimonial-card {
    background: var(--color-light);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.testimonial-card.active {
    display: block;
    opacity: 1;
}

.stars {
    color: var(--color-gold);
    font-size: 24px;
    margin-bottom: 16px;
}

.testimonial-text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 16px;
    font-style: italic;
    color: #555;
}

.testimonial-author {
    font-weight: 600;
    color: var(--color-primary);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--color-secondary);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background var(--transition);
}

.dot.active {
    background: var(--color-primary);
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: background var(--transition), transform var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: #fff;
}

/* ===== SERVICES PREVIEW ===== */
.service-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.service-preview.reverse {
    direction: rtl;
}

.service-preview.reverse > * {
    direction: ltr;
}

.service-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.service-text {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 24px;
}

/* ===== SERVICES DETAIL ===== */
.page-header {
    background: var(--color-primary);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 48px;
    margin-bottom: 12px;
}

.page-header p {
    font-size: 20px;
    opacity: 0.9;
}

.service-detail-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.service-detail-card.reverse {
    direction: rtl;
}

.service-detail-card.reverse > * {
    direction: ltr;
}

.service-detail-content h2 {
    font-size: 32px;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.service-detail-content h3 {
    font-size: 20px;
    color: var(--color-secondary);
    margin-bottom: 16px;
}

.service-detail-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

/* ===== GALLERY ===== */
.gallery-section {
    background: var(--color-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== PERSONAL CARGO ===== */
.personal-cargo-info {
    background: var(--color-light);
}

.lead-text {
    font-size: 20px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    background: var(--color-primary);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.feature-item p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

.cta-text {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-primary);
    text-align: center;
}

/* ===== FORM ===== */
.form-section {
    background: #fff;
}

.form-container {
    display: grid;
    grid-template-columns: 0.9fr 1.5fr;
    gap: 40px;
    align-items: stretch;
}

.form-image {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.boxes-stack {
    display: flex;
    flex-direction: column;      /* columna vertical */
    justify-content: space-around;
    align-items: center;
    height: 100%;
    gap: 24px;
}

.box-img {
    width: 180px;                /* tamaño decente para que no pierda calidad */
    height: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 8px;
    transition: transform 0.2s ease;
}

/* Zig-zag: una a la izquierda, otra a la derecha */
.boxes-stack .box-img:nth-child(odd) {
    transform: translateX(-75px) rotate(-3deg);
}

.boxes-stack .box-img:nth-child(even) {
    transform: translateX(75px) rotate(3deg);
}

.form-content h2 {
    font-size: 36px;
    color: var(--color-primary);
    margin-bottom: 32px;
}

.mailbox-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    transition: border var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group label {
    font-weight: 400;
}

.checkbox-group a {
    color: var(--color-primary);
    text-decoration: underline;
}

.form-note {
    font-size: 14px;
    color: #777;
    font-style: italic;
    margin-top: 16px;
}

/* ===== TERMS ===== */
.terms-section {
    background: #fff;
}

.terms-content {
    max-width: 900px;
    margin: 0 auto;
}

.terms-content h2 {
    font-size: 28px;
    color: var(--color-primary);
    margin-bottom: 32px;
    line-height: 1.4;
}

.terms-list {
    list-style: decimal;
    padding-left: 24px;
}

.terms-list li {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #555;
    font-size: 16px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-primary);
    color: #fff;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-text {
    line-height: 1.8;
    opacity: 0.9;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    background: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), transform var(--transition);
}

.social-link:hover {
    background: var(--color-secondary);
    transform: translateY(-3px);
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    opacity: 0.8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: #fff;
        flex-direction: column;
        padding: 40px 20px;
        transition: left var(--transition);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 12px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .nosotros-grid,
    .service-preview,
    .service-detail-card,
    .form-container {
        grid-template-columns: 1fr;
    }

    .service-preview.reverse,
    .service-detail-card.reverse {
        direction: ltr;
    }

    .section-title {
        font-size: 32px;
    }

    .testimonials-carousel {
        padding: 0 50px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .boxes-stack {
        height: 300px;
    }

    .box-img {
        width: 150px;
    }
}

@media (max-width: 640px) {
    .hero-section {
        height: 400px;
    }

    .hero-title {
        font-size: 28px;
    }

    .section-title {
        font-size: 28px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .testimonials-carousel {
        padding: 0 40px;
    }

    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {

  /* El formulario en una sola columna */
  .form-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Los logos se ordenan automáticamente sin zigzag */
  .boxes-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  /* Tamaño ideal para móvil */
  .boxes-stack img {
    max-width: 150px;
    height: auto;
  }

  /* 4 logos arriba */
  .boxes-stack .brand-box:nth-child(-n+4) {
    order: 1;
  }

  /* 4 logos abajo */
  .boxes-stack .brand-box:nth-child(n+5) {
    order: 3;
  }

  /* El formulario queda en el centro */
  form {
    order: 2;
  }
}
/* Por defecto (desktop): ocultamos los grupos móviles */
.logos-mobile-top,
.logos-mobile-bottom {
    display: none;
}

/* MODO MÓVIL */
@media (max-width: 768px) {

    /* El formulario pasa a una sola columna */
    .form-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Ocultamos la columna de logos en zig-zag para que no se monten */
    .form-image {
        display: none;
    }

    /* Mostramos los logos especiales para móvil */
    .logos-mobile-top,
    .logos-mobile-bottom {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        margin: 12px 0;
    }

    .logos-mobile-top img,
    .logos-mobile-bottom img {
        max-width: 120px;  /* ajusta si los quieres más grandes */
        height: auto;
        display: block;
    }
}