/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
}

/* Ensure the page never exceeds viewport width on small devices */
html, body {
    width: 100%;
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Force hero to span the full viewport width to avoid visual gaps */
.hero {
    min-width: 100vw;
}

/* -----------------------------------------------------------
   TOP BLACK BAR
----------------------------------------------------------- */
.top-bar {
    width: 100%;
    height: 50px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
}

.menu-icon {
    font-size: 28px;
    cursor: pointer;
    font-weight: bold;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.slogan {
    font-size: 15px;
    letter-spacing: 0.5px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    width: 100%;
}

/* -----------------------------------------------------------
   SIDE MENU (HAMBURGER)
----------------------------------------------------------- */
.side-menu {
    position: fixed;
    left: -260px;
    top: 0;
    width: 260px;
    height: 100%;
    background: #111;
    padding-top: 70px;
    transition: 0.4s;
    z-index: 3000;
}

.side-menu a {
    display: block;
    padding: 16px 25px;
    border-bottom: 1px solid #333;
    text-decoration: none;
    color: white;
    font-size: 18px;
}

/* -----------------------------------------------------------
   HERO BASE
----------------------------------------------------------- */
.hero {
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    --hero-bg-desktop: none;
    --hero-bg-tablet: var(--hero-bg-desktop);
    --hero-bg-mobile: var(--hero-bg-tablet);
    background-image: var(--hero-bg-desktop);

    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

@media (max-width: 1024px) {
    .hero {
        background-image: var(--hero-bg-tablet);
    }
}

@media (max-width: 600px) {
    .hero {
        background-image: var(--hero-bg-mobile);
    }
}

/* Compact styles for the quote form on small screens */
@media (max-width: 480px) {
    .contact-box.quote-box {
        width: 92%;
        max-width: 520px;
        margin: 130px auto 20px auto; /* increased top spacing so logo is visible */
        padding: 12px 14px; /* reduce padding for compactness */
        font-size: 14px;
    }

    .contact-box.quote-box h1 {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .quote-grid label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .quote-grid input,
    .quote-grid textarea {
        padding: 8px 10px;
        font-size: 14px;
        border-radius: 6px;
    }

    .quote-grid textarea { rows: 3; }

    .quote-submit {
        padding: 10px;
        font-size: 15px;
        border-radius: 8px;
    }

    /* reduce form width a bit when the hero background is very narrow */
    .hero-quote .contact-box.quote-box {
        width: 94%;
    }
}

/* -----------------------------------------------------------
   HOME RESPONSIVE BACKGROUNDS
----------------------------------------------------------- */
.hero-home {
    --hero-bg-desktop: url('images/home-d.jpg');
    --hero-bg-tablet: url('images/home-t.jpg');
    --hero-bg-mobile: url('images/home-m.jpg');
}

/* Tablet */
@media (max-width: 1024px) {
    .hero-home {
        height: 92vh;
    }
    .bottom-menu { bottom: 25px; }
}

/* Landscape tablet fix */
@media (min-width: 600px) and (max-width: 1200px) and (orientation: landscape) {
    .hero-home {
        height: 82vh;
    }
    .bottom-menu {
        bottom: 15px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .hero {
        height: 92vh;
    }

    .bottom-menu {
        bottom: 25px;
    }
}

@media (min-width: 600px) and (max-width: 1200px) {
    .hero-home {
        height: min(82vh, 700px);
    }
}

/* TABLET HORIZONTAL FIX (iPad landscape, Samsung Tab landscape, etc.) */
@media (min-width: 700px) and (max-width: 1400px) and (orientation: landscape) {
    .hero-home {
        height: 87vh !important; /* Altura segura */
        background-size: cover !important;
        background-position: center top !important;
    }

    .bottom-menu {
        bottom: 15px !important; /* Siempre visible */
        font-size: 17px;
    }

    .top-bar {
        height: 48px;
    }
}

@media (min-width: 600px) and (max-width: 1400px) {
    .hero-home {
        height: 87vh !important;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .hero-home {
        height: 95vh !important;
        background-position: top center !important;
        background-size: 100% 100%;
    }

    .bottom-menu {
        bottom: 15px;
        font-size: 14px;
    }
}

/* -----------------------------------------------------------
   BOTTOM MENU
----------------------------------------------------------- */
.bottom-menu {
    position: fixed;
    bottom: 12px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 1px;
    z-index: 4000; /* subir para asegurarse que el footer quede visible sobre otros elementos */
    padding: 4px 0;
}

.bottom-menu a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
}

.bottom-menu span {
    margin: 0 8px;
    color: #fff;
}

/* -----------------------------------------------------------
   RESPONSIVE FIXES
----------------------------------------------------------- */
@media (max-width: 768px) {
    .slogan {
        font-family: 'Arial Narrow', Arial, sans-serif;
        font-size: 13px;
        line-height: 1.15;
        letter-spacing: 0.2px;
        white-space: normal;
    }
    .bottom-menu {
        font-size: 15px;
    }
    .bottom-menu span {
        margin: 0 5px;
    }
}

/* -----------------------------------------------------------
   DESKTOP HEADER ADJUSTMENTS
   Aumentar tamaño del texto del encabezado en pantallas grandes
----------------------------------------------------------- */
@media (min-width: 1025px) {
    .slogan {
        font-size: 18px; /* mayor tamaño para desktop */
    }
    .top-bar {
        height: 56px; /* ajustar altura para evitar recorte */
    }
}

@media (min-width: 1400px) {
    .slogan {
        font-size: 20px; /* aún mayor en pantallas muy grandes */
    }
    .top-bar {
        height: 60px;
    }
}


/* -----------------------------------------------------------
   TEAM PAGE
----------------------------------------------------------- */
.hero-team {
    --hero-bg-desktop: url('images/team-d.jpg');
    --hero-bg-tablet: url('images/team-t.jpg');
    --hero-bg-mobile: url('images/team-m.jpg');
    /* Keep aspect ratio and cover the area without distortion */
    background-size: cover !important;
    background-position: center center !important;
}

/* Tablet */
@media (max-width: 1024px) {
    .hero-team {
        background-size: cover;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .hero-team {
        background-image: url('images/team-m.jpg') !important;
        background-size: cover;
        background-position: center top !important;
    }
}

/* Tablet portrait: force mobile team image on vertical tablets */
@media (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
    /* override the tablet custom property so the base .hero rule picks the mobile image */
    .hero-team {
        --hero-bg-tablet: url('images/team-m.jpg');
        background-size: cover !important;
        background-position: center top !important;
    }
}

/* Form message styles for get_quote */
.form-message {
    width: 100%;
    max-width: 900px;
    margin: 18px auto 0 auto;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 18px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}
.form-message.success {
    background: rgba(28, 167, 82, 0.95);
    color: #fff;
}
.form-message.error {
    background: rgba(200, 50, 50, 0.95);
    color: #fff;
}


/* -----------------------------------------------------------
   CONTACT PAGE
----------------------------------------------------------- */
.hero-contact {
    --hero-bg-desktop: url('images/contact-d.jpg');
    --hero-bg-tablet: url('images/contact-t.jpg');
    --hero-bg-mobile: url('images/contact-m.jpg');
    background-size: cover;
    background-position: center;
}

.contact-box {
    width: 90%;
    max-width: 900px;
    margin: 150px auto 0 auto;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    padding: 50px;
    border-radius: 15px;
    text-align: center;
}

.contact-box h1 { font-size: 42px; text-shadow: 2px 2px 4px black; }
.contact-box h2 { font-size: 26px; margin-top: 25px; }
.contact-box p  { font-size: 22px; margin-top: 5px; }

@media (max-width: 600px) {
    .contact-box { padding: 30px; }
    .contact-box h1 { font-size: 32px; }
    .contact-box h2 { font-size: 22px; }
    .contact-box p  { font-size: 18px; }
}

.quote-box {
    margin-top: 190px;
}

@media (max-width: 600px) {
    .quote-box {
        margin-top: 170px;
    }
}

/* -----------------------------------------------------------
   ABOUT PAGE
----------------------------------------------------------- */
.hero-about {
    --hero-bg-desktop: url('images/about-d.jpg');
    --hero-bg-tablet: url('images/about-t.jpg');
    --hero-bg-mobile: url('images/about-m.jpg');
    background-size: cover;
    background-position: center;
}

.hero-quote {
    --hero-bg-desktop: url('images/get_quote-d.jpg');
    --hero-bg-tablet: url('images/get_quote-t.jpg');
    --hero-bg-mobile: url('images/get_quote-m.jpg');
}

.hero-partners {
    --hero-bg-desktop: url('images/our_partners-d.jpg');
    --hero-bg-tablet: url('images/our_partners-t.jpg');
    --hero-bg-mobile: url('images/our_partners-m.jpg');
}

.about-box {
    width: 90%;
    max-width: 950px;
    margin: 160px auto 0 auto;
    padding: 30px 40px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    border-radius: 15px;
    text-align: center;
    font-size: 22px;
    line-height: 1.65;
    text-shadow: 1px 1px 3px black;
}

@media (max-width: 600px) {
    .about-box {
        padding: 14px 12px; /* aún menos padding para ganar más espacio */
        font-size: 14px;    /* reducción adicional para caber en pantalla */
        line-height: 1.35;  /* interlineado más compacto */
        margin-top: 80px;   /* reducir margen superior para más espacio vertical */
    }

    /* Make the emphasized mission line slightly smaller on small screens */
    .about-box p em {
        font-size: 16px;
    }
}

/* -----------------------------------------------------------
   PARTNERS SECTION
----------------------------------------------------------- */
.partners-section {
    text-align: center;
    margin-top: 340px;
    margin-bottom: 140px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.partners-title {
    font-size: 36px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 3px black;
    margin: 35px 0 20px 0;
}

.carousel-box {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 60px auto;
    background: white;
    border-radius: 10px;
    padding: 15px 0;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0,0,0,0.25);
}

.carousel-track {
    display: flex;
    gap: 45px;
    animation: slide-left 12s linear infinite;
}

.carousel-box:hover .carousel-track {
    animation-play-state: paused;
}

.carousel-track img {
    height: 75px;
    object-fit: contain;
    filter: brightness(0.9);
}

@keyframes slide-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 600px) {
    .carousel-track img { height: 60px; }
    .carousel-box { padding: 15px 0; }
}

/* Responsive adjustments for partners section on tablets and mobile */
@media (max-width: 1024px) {
    .partners-section {
        margin-top: 220px; /* reduce vertical spacing on tablets */
        margin-bottom: 80px;
    }
    .partners-title {
        font-size: 28px;
    }
    .carousel-box {
        width: 75%; /* larger band on tablets */
        max-width: 900px;
        padding: 12px 0;
        margin: 0 auto 35px auto;
    }
    .carousel-track {
        gap: 24px;
        animation-duration: 14s; /* slow a bit for narrower screens */
    }
    .carousel-track img {
        height: 70px;
    }
}

@media (max-width: 600px) {
    .partners-section {
        margin-top: 160px; /* compact vertical spacing on phones */
        margin-bottom: 60px;
    }
    .partners-title {
        font-size: 20px;
        margin: 18px 0;
    }
    .carousel-box {
        width: 80%; /* increased band on phones per request */
        max-width: 90vw; /* cap to viewport width for very narrow screens */
        padding: 10px 0;
        margin: 0 auto 20px auto;
    }
    .carousel-track {
        gap: 16px;
        animation-duration: 16s;
    }
    .carousel-track img {
        height: 56px; /* slightly larger logos at 60% band */
    }
}

/* Reverse animation for tracks with class .reverse */
.carousel-track.reverse {
    animation-direction: reverse;
}

/* -----------------------------------------------------------
   GET QUOTE FORM LAYOUT
----------------------------------------------------------- */
.quote-form {
    margin-top: 25px;
}

.quote-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px 18px;
}

.quote-grid .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.quote-grid .span-4 { grid-column: span 4; }
.quote-grid .span-6 { grid-column: span 6; }
.quote-grid .span-12 { grid-column: span 12; }

.quote-grid input,
.quote-grid textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: none;
    font-size: 15px;
}

.quote-grid textarea {
    resize: vertical;
}

.quote-submit {
    margin-top: 18px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #fff;
    color: #000;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

.quote-submit:hover {
    background: #f1f1f1;
}

@media (max-width: 768px) {
    .quote-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    .quote-grid .span-4,
    .quote-grid .span-6,
    .quote-grid .span-12 {
        grid-column: span 1;
    }
}
