/* Variables de color */
:root {
    --primary-color: #ecbd01;
    --secondary-color: #153178;
    --text-color: #3b3b3b;
    --light-bg: #f8f9fa;
    --dark-bg: #153178;
    --ink: #11265c;
    --radius: 18px;
    --brand: #ff2323;
    --brand-2: #19b73a;
}

/* Base y tipografía */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: linear-gradient(-45deg, #619fff, #fff649, #87CEFA, #90EE90);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1, h2, h3 {
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-top: 2rem;
}

h3 {
    font-size: clamp(1.5rem, 3.5vw, 1.6rem);
}

p {
    margin-bottom: 1rem;
}

strong {
    font-weight: 700;
}

/* Clases de utilidad */
.container {
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
}

.bg-light {
    background-color: var(--light-bg);
}

.text-justify {
    text-align: justify;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    border-radius: var(--radius);
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.btn-primary:hover {
    background-color: #d1a800;
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--secondary-color);
    color: var(--light-bg);
}

.btn-success:hover {
    background-color: #1c3b8a;
    transform: translateY(-2px);
}

.btn-ghost {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-ghost:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Navbar */
.main-header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/logisticaestibas2025.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.6);
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: transparent;
    transition: background-color 0.4s ease;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 100;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--secondary-color);
    text-decoration: none;
}

.logo-img {
    height: 35px;
    margin-right: 0.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Navbar Toggle */
#nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
    position: relative;
}

.hamburger {
    position: relative;
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: background-color 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

#nav-toggle[aria-expanded="true"] .hamburger {
    background-color: transparent;
}

#nav-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

#nav-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Hero Section */
.hero-section {
    /*display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-grow: 1;
    padding-top: 4rem;*/
    position: relative;
    z-index: 2;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-grow: 1;
    padding-top: 8rem;
}

.hero-content {
    max-width: 800px;
    margin: auto;
}

.hero-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.hero-eyebrow {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.cta {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Sections */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.service-card {
    text-align: center;
    background-color: #fff;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0; /* Para la animación */
    transform: translateY(20px); /* Para la animación */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.service-card.loaded {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Advantage Section */
.advantages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
}

.advantage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    transition: transform 0.3s ease;
    opacity: 0; /* Para la animación */
    transform: translateY(20px); /* Para la animación */
}

.advantage-item.loaded {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.advantage-item img {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.advantage-item h4 {
    color: var(--secondary-color);
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease-in-out;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /*background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));*/
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgb(24 47 127 / 74%));
    color: #fff;
    padding: 1rem;
    text-align: left;
}

.item-overlay h4 {
    color: #fff;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.item-overlay span {
    font-size: 0.7rem;
    font-style: italic;
    color: #ccc;
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 2rem auto;
}

.faq-container details {
    background-color: #fff;
    color: var(--text-color);
    margin: 1rem 0;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    opacity: 0; /* Para la animación */
    transform: translateY(20px); /* Para la animación */
}

.faq-container details.loaded {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.faq-container summary {
    font-weight: 600;
    cursor: pointer;
    font-size: 1.1rem;
    outline: none;
    display: block;
    position: relative;
}

.faq-container summary::-webkit-details-marker {
    display: none;
}

.faq-container summary::after {
    content: '+';
    position: absolute;
    right: 0;
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.faq-container details[open] summary::after {
    content: '-';
    transform: rotate(360deg);
}

.faq-container p {
    margin-top: 1rem;
    padding-left: 1rem;
}

/* Contact Section */
.contact-container {
    text-align: center;
}

.contact-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-info {
    font-size: 1.1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.contact-item a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--secondary-color);
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Footer */
.main-footer {
    background-color: var(--dark-bg);
    color: #fff;
    text-align: center;
    padding: 1rem 0;
}

.main-footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius);
}

.modal-caption {
    margin-top: 20px;
    color: #fff;
    font-size: 1.5rem;
    text-align: center;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Media Queries */
@media (min-width: 768px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }

    .advantage-item {
        flex-direction: row;
        text-align: left;
        align-items: center;
    }

    .advantage-item img {
        width: 150px;
        height: 150px;
        flex-shrink: 0;
        margin-bottom: 0;
        margin-right: 1.5rem;
    }

    .contact-grid {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        flex-direction: column;
        display: none;
        border-top: 1px solid #ddd;
        padding-bottom: 1rem;
        box-shadow: 0 4px 5px rgba(0, 0, 0, 0.05);
    }
    
    .nav-links a {
        padding: 1rem 2rem;
        display: block;
    }
    
    #nav-toggle {
        display: block;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .advantages-grid {
        gap: 2rem;
    }

    .advantage-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .hero-section {
        padding-top: 80px;
        padding-bottom: 50px;
    }

    .hero-card {
        padding: 1.2rem;
        max-width: 95%;
        margin: 0 auto;
    }

    .hero-card h1 {
        font-size: 1.8em;
    }
    .hero-card h2 {
        font-size: 1.8em;
    }

    .hero-card p {
        font-size: 0.9em;
    }
}