/* Estilos personalizados para CARGO - Transportation & Logistics */

body {
    font-family: 'Inter', sans-serif;
    padding-top: 7rem; /* Espacio para top bar fijo + header fijo */
}

/* Animaciones personalizadas */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

.slide-up {
    animation: slideUp 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efectos hover personalizados */
.btn-hover:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Header sticky con efecto blur */
.header-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    top: 2.5rem; /* Posicionado debajo del top bar */
    z-index: 50;
}

/* Top bar styles */
.top-bar {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.top-bar-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar-item i {
    color: var(--primary-color);
}

.top-bar-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-link {
    color: white;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        text-align: center;
    }
    
    .top-bar-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .top-bar-social {
        justify-content: center;
        margin-top: 0.5rem;
    }
}

/* Colores personalizados */
:root {
    --primary-color: #f6cb24;
    --primary-hover: #e6b820;
    --dark-gray: #1A1A1A;
    --white: #FFFFFF;
}

/* Botón principal con color personalizado */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* Efectos de hover para enlaces del menú */
.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
}

@media (min-width: 769px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5rem;
    }
}

/* Sección Servicios */
.services-section {
    padding: 5rem 0;
    background-image: url('image/banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.1) 1px, transparent 0);
    background-size: 20px 20px;
    opacity: 0.8;
    pointer-events: none;
}

.services-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.services-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.services-intro {
    color: white;
}

.services-intro .small-title {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.services-intro .main-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.services-intro .description {
    font-size: 1.125rem;
    color: #e5e7eb;
    line-height: 1.6;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-card {
    background-color: var(--primary-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(246, 203, 36, 0.3);
}

.stat-card .icon {
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.stat-card .content {
    flex: 1;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.stat-card .label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.service-card {
    background-color: #1f2937;
    padding: 2rem;
    border-radius: 1rem;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.service-card .card-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
}

.service-card .icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card .title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.service-card .description {
    font-size: 0.875rem;
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.service-card .read-more {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.service-card .read-more:hover {
    color: var(--primary-color);
}

.service-card .read-more i {
    transition: transform 0.3s ease;
}

.service-card .read-more:hover i {
    transform: translateX(4px);
}

@media (max-width: 1024px) {
    .services-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .services-intro .main-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .services-intro .main-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .number {
        font-size: 1.5rem;
    }
}

/* Sección Sobre Nosotros */
.about-section {
    padding: 5rem 0;
    background-color: #ffffff;
}

.about-title {
    text-align: center;
    margin-bottom: 3rem;
}

.about-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-title p {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.about-cards {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: auto auto;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    align-items: stretch;
}

.about-card-large {
    grid-row: 1 / 3;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.about-cards-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100%;
}

.about-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.about-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.about-card.featured {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
}

.about-card.about-card-dark {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
}

.about-card.about-card-dark h3 {
    color: white;
}

.about-card.about-card-dark p {
    color: rgba(255, 255, 255, 0.9);
}

.about-card.about-card-dark:hover {
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

.about-card.about-card-gray {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    color: #1f2937;
}

.about-card.about-card-gray h3 {
    color: #1f2937;
}

.about-card.about-card-gray p {
    color: #374151;
}

.about-card.about-card-gray:hover {
    background: linear-gradient(135deg, #d1d5db, #e5e7eb);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.about-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-card.featured h3 {
    color: white;
}

.about-card p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #4b5563;
}

.about-card.featured p {
    color: rgba(255, 255, 255, 0.9);
}

.about-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-card.featured .read-more {
    color: white;
}

.about-card .read-more:hover {
    transform: translateX(4px);
}

.about-card .read-more i {
    transition: transform 0.3s ease;
}

.about-card .read-more:hover i {
    transform: translateX(2px);
}

.about-card .card-icon {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    opacity: 0.1;
    font-size: 3rem;
}

.about-card.featured .card-icon {
    color: white;
    opacity: 0.2;
}

@media (max-width: 768px) {
    .about-title h2 {
        font-size: 2rem;
    }
    
    .about-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-card-large {
        grid-row: auto;
    }
    
    .about-cards-right {
        gap: 1.5rem;
    }
    
    .about-card {
        padding: 1.5rem;
    }
}

/* Galería Masonry con Filtros */
.gallery-section {
    padding: 5rem 0;
    background-color: #000000;
}

.gallery-title {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.gallery-title p {
    font-size: 1.125rem;
    color: #d1d5db;
    max-width: 600px;
    margin: 0 auto;
}

/* Filtros de Galería */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
    border: 2px solid transparent;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background-color: rgba(246, 203, 36, 0.2);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: #000000;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(246, 203, 36, 0.3);
}

.filter-btn i {
    font-size: 1rem;
}

/* Galería Masonry */
.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    content-visibility: auto;
}

.gallery-item {
    transition: opacity 0.25s ease, transform 0.25s ease;
    will-change: opacity, transform;
}

.gallery-item.gallery-hidden {
    display: none !important;
}

.gallery-item.gallery-visible {
    display: block;
    animation: galleryFadeIn 0.3s ease-out;
}

@keyframes galleryFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #1a1a1a;
    will-change: transform;
}

.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.gallery-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
    display: block;
}

.gallery-card:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(246, 203, 36, 0.9),
        rgba(230, 184, 32, 0.8)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: opacity;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    text-align: center;
    color: white;
    padding: 1rem;
}

.gallery-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery-info p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.view-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.view-btn:hover {
    background-color: white;
    color: var(--primary-color);
    transform: scale(1.05);
}

.view-btn i {
    margin-right: 0.5rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.lightbox-info {
    text-align: center;
    color: white;
    margin-top: 1rem;
}

.lightbox-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.lightbox-info p {
    font-size: 1rem;
    opacity: 0.8;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #000000;
    transform: scale(1.1);
}

.lightbox-prev {
    margin-left: -2rem;
}

.lightbox-next {
    margin-right: -2rem;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-title h2 {
        font-size: 2rem;
    }
    
    .gallery-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .masonry-gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-card img {
        height: 200px;
    }
    
    .lightbox-content img {
        max-height: 60vh;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .lightbox-prev {
        margin-left: -1rem;
    }
    
    .lightbox-next {
        margin-right: -1rem;
    }
}

@media (max-width: 480px) {
    .masonry-gallery {
        grid-template-columns: 1fr;
    }
    
    .gallery-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        justify-content: center;
    }
}

/* Modal de Cotización */
#cotizacion-modal {
    display: none;
    align-items: center;
    justify-content: center;
}

#cotizacion-modal[style*="display: flex"] {
    display: flex !important;
}

/* Ajustes para input date */
input[type="date"] {
    position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.5);
}

/* Scrollbar personalizado para el modal */
#cotizacion-modal div[class*="bg-white"]::-webkit-scrollbar {
    width: 8px;
}

#cotizacion-modal div[class*="bg-white"]::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#cotizacion-modal div[class*="bg-white"]::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#cotizacion-modal div[class*="bg-white"]::-webkit-scrollbar-thumb:hover {
    background: #555;
}
