:root {
    --primary: #1e3a8a;
    --primary-dark: #0f172a;
    --secondary: #2563eb;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --dark: #0f172a;
    --light: #ffffff;
    --gray: #6b7280;
    --gray-light: #f3f4f6;
    /* Industrial B2B palette */
    --steel-500: #4a6fa5;
    --steel-600: #3d5a80;
    --steel-700: #2e4a6f;
    --steel-800: #1e3a5f;
    --metal-600: #475569;
    --metal-700: #334155;
    --metal-800: #1e293b;
    --metal-900: #0f172a;
}

.font-rajdhani {
    font-family: 'Rajdhani', sans-serif;
}

* {
    font-family: 'Roboto', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
}

html {
    scroll-behavior: smooth;
}

/* Grid Background */
.grid-bg {
    background-image: 
        linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Primary Gradient - Basado en CRCH.jpg */
.gradient-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
}

.gradient-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.gradient-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

/* Modern Card */
.modern-card {
    background: white;
    border-left: 4px solid #2563eb;
    transition: all 0.3s ease;
}

.modern-card:hover {
    transform: translateX(8px);
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.2);
    border-left-color: #1e3a8a;
}

/* Image Overlay */
.img-overlay {
    position: relative;
    overflow: hidden;
}

.img-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(37, 99, 235, 0.85) 50%, rgba(59, 130, 246, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.img-overlay:hover::after {
    opacity: 1;
}

/* Scroll Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}

/* Service Card Flip */
.service-card {
    position: relative;
    height: 350px;
    perspective: 1000px;
}

@media (min-width: 768px) {
    .service-card {
        height: 400px;
    }
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
}

.service-card-back {
    transform: rotateY(180deg);
}

/* Hexagon Shape */
.hexagon {
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

/* Stats Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-number {
    animation: countUp 0.6s ease-out;
}

/* Navbar Scroll */
.navbar-scrolled {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom-color: rgba(71, 85, 105, 0.8);
}

/* Industrial B2B components */
.industrial-stat {
    transition: transform 0.2s ease;
}
.industrial-stat:hover {
    transform: scale(1.02);
}
.industrial-product-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.galeria-item img {
    transition: transform 0.3s ease;
}
.galeria-item:hover img {
    transform: scale(1.05);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Carousel Styles - Premium Design */
.gallery-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
}

@media (max-width: 640px) {
    .gallery-carousel {
        padding: 1rem;
        border-radius: 1.25rem;
    }
}

.carousel-container {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-page {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    flex-shrink: 0;
    min-height: 250px;
    padding: 0;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .carousel-page {
        gap: 1.25rem;
        min-height: 220px;
    }
}

@media (max-width: 640px) {
    .carousel-page {
        gap: 1rem;
        min-height: 200px;
    }
}

.carousel-slide {
    width: calc(25% - 1.125rem);
    flex-shrink: 0;
    height: 100%;
    position: relative;
}

@media (max-width: 1024px) {
    .carousel-slide {
        width: calc(33.333% - 0.833rem);
    }
}

@media (max-width: 640px) {
    .carousel-slide {
        width: calc(50% - 0.5rem);
    }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    backdrop-filter: blur(20px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4), 0 0 0 0 rgba(30, 64, 175, 0.5);
    font-size: 1.25rem;
}

.carousel-btn:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 12px 35px rgba(30, 64, 175, 0.6), 0 0 0 8px rgba(30, 64, 175, 0.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev {
    left: -1.5rem;
}

.carousel-btn.next {
    right: -1.5rem;
}

@media (max-width: 1024px) {
    .carousel-btn.prev {
        left: 0.5rem;
    }
    .carousel-btn.next {
        right: 0.5rem;
    }
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.carousel-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.carousel-indicator::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.carousel-indicator.active {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.3);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.carousel-indicator.active::before {
    opacity: 0.3;
}

.carousel-indicator:hover {
    background: rgba(59, 130, 246, 0.6);
    transform: scale(1.15);
}

/* Hero Carousel - una imagen a la vez, sin texto */
.hero-carousel-wrapper {
    position: relative;
}

.hero-carousel {
    position: relative;
}

.hero-carousel-inner {
    position: relative;
    width: 100%;
}

.hero-carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.hero-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    min-height: 280px;
}

@media (min-width: 640px) {
    .hero-carousel-slide {
        min-height: 320px;
    }
}

@media (min-width: 768px) {
    .hero-carousel-slide {
        min-height: 384px;
    }
}

@media (min-width: 1024px) {
    .hero-carousel-slide {
        min-height: 500px;
    }
}

.hero-carousel-img {
    width: 100%;
    height: auto;
    min-height: inherit;
    max-height: 600px;
    object-fit: contain;
    object-position: center;
    display: block;
}

.hero-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(30, 58, 138, 0.9);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.hero-carousel-btn:hover {
    background: #1e3a8a;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero-carousel-prev {
    left: 0.5rem;
}

.hero-carousel-next {
    right: 0.5rem;
}

@media (min-width: 768px) {
    .hero-carousel-prev {
        left: 1rem;
    }
    .hero-carousel-next {
        right: 1rem;
    }
}

.hero-carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 20;
}

.hero-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-carousel-dot.active {
    background: #2563eb;
    transform: scale(1.2);
}

.hero-carousel-dot:hover {
    background: rgba(37, 99, 235, 0.7);
}

/* Premium Image Wrapper */
.carousel-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    height: 100%;
    min-height: 250px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

@media (min-width: 640px) {
    .carousel-image-wrapper {
        min-height: 220px;
    }
}

@media (min-width: 1024px) {
    .carousel-image-wrapper {
        min-height: 250px;
    }
}

.carousel-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Additional Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 30px rgba(37, 99, 235, 0.8); }
}

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

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Smooth hover transitions */
.smooth-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-hover:hover {
    transform: translateY(-5px);
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Form Notification */
#form-notification {
    transform: translateX(400px);
    opacity: 0;
}

#form-notification.translate-x-0 {
    transform: translateX(0);
    opacity: 1;
}

