/* ===============================================
   RACURA SERVICES GROUP - STYLE.CSS
   Archivo CSS principal optimizado
   =============================================== */

:root {
    /* Colores principales del logo */
    --rsg-red: #e63946;
    --rsg-red-dark: #d62828;
    --rsg-blue: #1d3557;
    --rsg-blue-dark: #152238;
    --rsg-black: #0a0a0a;
    
    /* Colores complementarios */
    --rsg-white: #ffffff;
    --rsg-gray: #a8dadc;
    --rsg-gray-light: #f8f9fa;
}

/* ===============================================
   ESTILOS GLOBALES
   =============================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--rsg-black);
    background-color: var(--rsg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===============================================
   CONTENEDORES
   =============================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* ===============================================
   BOTONES - Compatible con Tailwind
   =============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--rsg-red);
    color: var(--rsg-white);
    border-color: var(--rsg-red);
}

.btn-primary:hover {
    background-color: var(--rsg-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.btn-secondary {
    background-color: var(--rsg-blue);
    color: var(--rsg-white);
    border-color: var(--rsg-blue);
}

.btn-secondary:hover {
    background-color: var(--rsg-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 53, 87, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--rsg-blue);
    border: 2px solid var(--rsg-blue);
}

.btn-outline:hover {
    background-color: var(--rsg-blue);
    color: var(--rsg-white);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--rsg-white);
    border: 2px solid var(--rsg-white);
}

.btn-outline-white:hover {
    background-color: var(--rsg-white);
    color: var(--rsg-red);
}

.btn-white {
    background-color: var(--rsg-white);
    color: var(--rsg-red);
    border-color: var(--rsg-white);
}

.btn-white:hover {
    background-color: var(--rsg-gray-light);
    transform: translateY(-2px);
}

/* ===============================================
   CARRUSEL - OPTIMIZADO PARA INICIO.PHP
   =============================================== */

.carousel {
    position: relative;
    width: 100%;
    height: calc(100vh - 64px);
    min-height: 450px;
    max-height: 800px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .carousel {
        height: calc(100vh - 64px);
        min-height: 400px;
        max-height: 600px;
    }
}

@media (max-width: 480px) {
    .carousel {
        min-height: 500px;
    }
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
}

.carousel-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 2rem 1rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Controles del Carrusel */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 3;
    pointer-events: none;
}

.carousel-arrow {
    pointer-events: auto;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

@media (max-width: 640px) {
    .carousel-arrow {
        width: 40px;
        height: 40px;
    }
}

/* Indicadores del Carrusel */
.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 3;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

.carousel-indicator.active {
    width: 32px;
    background-color: white;
}

/* ===============================================
   ANIMACIONES
   =============================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-slide-up-delay {
    animation: slideUp 1s ease-out 0.2s backwards;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.4s backwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ===============================================
   FORMULARIOS
   =============================================== */

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--rsg-blue);
    box-shadow: 0 0 0 3px rgba(29, 53, 87, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ===============================================
   UTILIDADES
   =============================================== */

.text-rsg-red {
    color: var(--rsg-red);
}

.text-rsg-blue {
    color: var(--rsg-blue);
}

.bg-rsg-red {
    background-color: var(--rsg-red);
}

.bg-rsg-blue {
    background-color: var(--rsg-blue);
}

.bg-rsg-blue-dark {
    background-color: var(--rsg-blue-dark);
}

/* ===============================================
   RESPONSIVE HELPERS
   =============================================== */

.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: block;
    }
}

.hide-desktop {
    display: block;
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none;
    }
}

/* ===============================================
   PERFORMANCE OPTIMIZATIONS
   =============================================== */

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* ===============================================
   ACCESSIBILITY
   =============================================== */

*:focus-visible {
    outline: 2px solid var(--rsg-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--rsg-blue);
    outline-offset: 2px;
}

/* ===============================================
   PREFERS REDUCED MOTION
   =============================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===============================================
   MOBILE OPTIMIZATIONS
   =============================================== */

@media (max-width: 768px) {
    .mobile-optimized * {
        animation-duration: 0.5s !important;
        transition-duration: 0.3s !important;
    }
    
    .mobile-optimized .animate-float {
        animation: none !important;
    }
}

/* ===============================================
   PRINT STYLES
   =============================================== */

@media print {
    .carousel-controls,
    .carousel-indicators,
    .no-print,
    header,
    footer {
        display: none !important;
    }
    
    body {
        color: black;
        background: white;
    }
    
    a {
        text-decoration: underline;
    }
}