/* Custom Styles for Immigration Crew Website */

:root { 
  /* Paleta base */
  --background: 220 5% 98%; 
  --foreground: 220 25% 15%; 
  --border: 220 8% 88%; 
  --card: 220 5% 96%; 
  --card-foreground: 220 25% 15%; 
  --card-border: 220 8% 85%; 

  /* Primario (nuevo azul #07435E) */
  --primary: 199 86% 20%; 
  --primary-foreground: 220 10% 98%; 

  /* Secundario */
  --secondary: 220 8% 86%; 
  --secondary-foreground: 220 25% 20%; 

/* Acento (amarillo #EAB308) */
 --accent: 45 92% 53%;
 --accent-foreground: 215 25% 15%;

  /* Estados y utilitarios */
  --destructive: 0 72% 35%; 
  --destructive-foreground: 0 10% 98%; 
  --muted: 220 10% 90%; 
  --muted-foreground: 220 15% 45%; 
  --input: 220 15% 65%; 
  /* Ring basado en primary, un poco más claro */
  --ring: 199 70% 35%; 
}

/* Estilos para usar con las nuevas variables de color */
.bg-primary {
  background-color: hsl(var(--primary)) !important;
}
.text-primary-foreground {
  color: hsl(var(--primary-foreground)) !important;
}
.bg-background {
  background-color: hsl(var(--background)) !important;
}
.text-foreground {
  color: hsl(var(--foreground)) !important;
}
.bg-card {
  background-color: hsl(var(--card)) !important;
}
.text-card-foreground {
  color: hsl(var(--card-foreground)) !important;
}
.border-card-border {
  border-color: hsl(var(--card-border)) !important;
}
.bg-secondary {
  background-color: hsl(var(--secondary)) !important;
}
.text-secondary-foreground {
  color: hsl(var(--secondary-foreground)) !important;
}
.bg-accent {
  background-color: hsl(var(--accent)) !important;
}
.text-accent-foreground {
  color: hsl(var(--accent-foreground)) !important;
}
.bg-muted {
  background-color: hsl(var(--muted)) !important;
}
.text-muted-foreground {
  color: hsl(var(--muted-foreground)) !important;
}

/* General Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
}

.header-nav-inner {
    position: relative;
}

.header-actions {
    display: none;
}

@media (min-width: 768px) {
    .header-nav-inner {
        padding-right: 18rem;
    }

    .header-actions {
        display: flex;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        align-items: center;
        gap: 1rem;
        z-index: 60;
    }
}

/* Evitar desbordes de textos largos (emails, URLs) */
.wrap-long {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Ticker Animation */
.ticker-container {
    display: flex;
    animation: ticker 20s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    margin-right: 50px;
}

@keyframes ticker {
    0% {
        transform: translateX(0%); /* visible desde el inicio */
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Button Hover Effects */
.btn-hover-effect:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Card Hover Effects */
.card-hover:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

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

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--primary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--ring));
}

/* Form Styles */
.form-input:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsla(var(--primary) / 0.3);
}

/* Custom Backgrounds */
.bg-pattern {
    background-color: hsl(var(--background));
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2307435E' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Custom Section Styles */
.section-divider {
    height: 4px;
    width: 60px;
    background-color: hsl(var(--accent));
    margin: 0 auto 2rem;
}

/* Team Member Cards */
.team-social {
    opacity: 1;
}

/* Testimonial Styles */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 60px;
    color: rgba(7, 67, 94, 0.1);
    font-family: serif;
}

/* Service Box Styles */
.service-box:hover .service-icon {
    transform: scale(1.1);
}

.service-icon {
    transition: transform 0.3s ease;
}

/* Custom Shadows */
.custom-shadow {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Image Styles */
.img-border {
    border: 5px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Footer Styles */
.footer-link {
    position: relative;
    display: inline-block;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: hsl(var(--accent));
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

/* Unificación de estilo de enlaces en footer */
footer a {
    color: hsl(var(--accent));
    transition: color 0.2s ease;
}

footer a:hover {
    color: hsl(var(--primary-foreground));
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: hsl(var(--primary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 30px rgba(30, 58, 138, 0.6);
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 58, 138, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(30, 58, 138, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(30, 58, 138, 0);
    }
}

/* Animaciones adicionales para elementos */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

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

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

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

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

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

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Parallax effect */
.parallax-section {
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo en hover para botones */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.btn-shine:hover::before {
    left: 100%;
}

/* Counter animation */
.counter {
    font-weight: bold;
    font-size: 2.5rem;
}

/* Card lift effect mejorado - MUY VISIBLE */
.card-lift {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.card-lift::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), rgba(234, 179, 8, 0.05));
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit;
    z-index: -1;
}

.card-lift:hover {
    transform: translateY(-15px) scale(1.05) rotateX(2deg);
    box-shadow: 0 25px 50px rgba(30, 58, 138, 0.3), 0 10px 20px rgba(234, 179, 8, 0.2);
}

.card-lift:hover::before {
    opacity: 1;
}

/* Efecto de onda en botones */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Icon bounce on hover */
.icon-bounce:hover {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive adjustments for floating button */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 80px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 26px;
    }
}

/* Hero section improvements */
.hero-title {
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    animation: heroFadeIn 1.5s ease-out;
}

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

/* Service card icon glow effect */
.service-card:hover .fas {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}

/* Modern button styles with gradient */
.btn-gradient {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Stats counter styling */
.counter {
    background: linear-gradient(135deg, hsl(var(--accent)), hsl(var(--primary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3.5rem;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(234, 179, 8, 0.3);
}

/* Flip card base */
.flip-card {
    perspective: 1000px;
    position: relative;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 0.5rem; /* matches rounded-lg */
    overflow: hidden;
}
.flip-card-back {
    transform: rotateY(180deg);
}
