/* Custom animations */
@keyframes pulse-blue {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
}

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

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

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

@keyframes slideInFromRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.animate-pulse-blue { animation: pulse-blue 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-slideInUp { animation: slideInUp 0.6s ease-out; }
.animate-fadeIn { animation: fadeIn 1s ease-out; }
.animate-slideInFromRight { animation: slideInFromRight 1s ease-out; }
.animate-slideInFromLeft { animation: slideInFromLeft 1s ease-out; }

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #1e40af, #1e3a8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #3b82f6, #1e40af);
    border-radius: 4px;
}

/* Icon hover effects */
.icon-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.icon-hover:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Hero carousel styles */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(30, 64, 175, 0.8) 0%, 
        rgba(59, 130, 246, 0.7) 50%, 
        rgba(30, 58, 138, 0.8) 100%);
}

/* Parallax effect for hero */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Enhanced hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom button animations */
.btn-primary {
    position: relative;
    overflow: hidden;
}

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

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

/* Loading animation */
.spinner {
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top: 4px solid #3b82f6;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced card animations */
.card-entrance {
    animation: cardEnter 0.6s ease-out forwards;
}

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

/* News card specific styles */
.news-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.news-card:hover .news-image {
    transform: scale(1.1);
}

.news-image {
    transition: transform 0.5s ease;
}

/* Contact form enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

/* Social media hover effects */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    filter: brightness(1.2);
}

/* Stats counter animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Enhanced background image handling */
.bg-hero-section {
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    position: relative;
}

/* Optimización específica para imagen desde img folder */
.hero-background-img {
    background-image: url('../img/Forodelaproduccion.png');
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Responsive background handling para img folder */
@media (max-width: 768px) {
    .hero-background-img {
        background-attachment: scroll; /* Better performance on mobile */
        background-position: center top;
        background-size: cover;
    }
    
    .bg-hero-section {
        background-attachment: scroll;
        background-position: center top;
    }
}

/* High-resolution display support para img folder */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-background-img {
        background-image: url('../img/Forodelaproduccion.png');
    }
}

/* Logo optimizations */
.logo-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.logo-image:hover {
    opacity: 0.9;
}

/* Drop shadow para texto sobre imagen de fondo */
.text-shadow-strong {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.text-shadow-soft {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* Overlay improvements para mejor contraste */
.hero-overlay {
    background: linear-gradient(
        135deg, 
        rgba(30, 64, 175, 0.3) 0%, 
        rgba(0, 0, 0, 0.4) 50%, 
        rgba(30, 58, 138, 0.3) 100%
    );
}

/* Logo en navbar con efectos */
.navbar-logo {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-logo:hover {
    transform: rotate(5deg) scale(1.1);
}

/* Parallax effect for hero */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Enhanced hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom button animations */
.btn-primary {
    position: relative;
    overflow: hidden;
}

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

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

/* Loading animation */
.spinner {
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top: 4px solid #3b82f6;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced card animations */
.card-entrance {
    animation: cardEnter 0.6s ease-out forwards;
}

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

/* News card specific styles */
.news-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.news-card:hover .news-image {
    transform: scale(1.1);
}

.news-image {
    transition: transform 0.5s ease;
}

/* Contact form enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

/* Social media hover effects */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    filter: brightness(1.2);
}

/* Stats counter animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Enhanced background image handling */
.bg-hero-section {
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    position: relative;
}

/* Optimización específica para imagen desde img folder */
.hero-background-img {
    background-image: url('../img/Forodelaproduccion.png');
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Responsive background handling para img folder */
@media (max-width: 768px) {
    .hero-background-img {
        background-attachment: scroll; /* Better performance on mobile */
        background-position: center top;
        background-size: cover;
    }
    
    .bg-hero-section {
        background-attachment: scroll;
        background-position: center top;
    }
}

/* High-resolution display support para img folder */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-background-img {
        background-image: url('../img/Forodelaproduccion.png');
    }
}

/* Logo optimizations */
.logo-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.logo-image:hover {
    opacity: 0.9;
}

/* Drop shadow para texto sobre imagen de fondo */
.text-shadow-strong {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.text-shadow-soft {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* Overlay improvements para mejor contraste */
.hero-overlay {
    background: linear-gradient(
        135deg, 
        rgba(30, 64, 175, 0.3) 0%, 
        rgba(0, 0, 0, 0.4) 50%, 
        rgba(30, 58, 138, 0.3) 100%
    );
}

/* Logo en navbar con efectos */
.navbar-logo {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-logo:hover {
    transform: rotate(5deg) scale(1.1);
}

/* Parallax effect for hero */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Enhanced hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom button animations */
.btn-primary {
    position: relative;
    overflow: hidden;
}

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

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

/* Loading animation */
.spinner {
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top: 4px solid #3b82f6;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced card animations */
.card-entrance {
    animation: cardEnter 0.6s ease-out forwards;
}

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

/* News card specific styles */
.news-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.news-card:hover .news-image {
    transform: scale(1.1);
}

.news-image {
    transition: transform 0.5s ease;
}

/* Contact form enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

/* Social media hover effects */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    filter: brightness(1.2);
}

/* Stats counter animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Enhanced background image handling */
.bg-hero-section {
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    position: relative;
}

/* Optimización específica para imagen desde img folder */
.hero-background-img {
    background-image: url('../img/Forodelaproduccion.png');
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Responsive background handling para img folder */
@media (max-width: 768px) {
    .hero-background-img {
        background-attachment: scroll; /* Better performance on mobile */
        background-position: center top;
        background-size: cover;
    }
    
    .bg-hero-section {
        background-attachment: scroll;
        background-position: center top;
    }
}

/* High-resolution display support para img folder */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-background-img {
        background-image: url('../img/Forodelaproduccion.png');
    }
}

/* Logo optimizations */
.logo-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.logo-image:hover {
    opacity: 0.9;
}

/* Drop shadow para texto sobre imagen de fondo */
.text-shadow-strong {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.text-shadow-soft {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* Overlay improvements para mejor contraste */
.hero-overlay {
    background: linear-gradient(
        135deg, 
        rgba(30, 64, 175, 0.3) 0%, 
        rgba(0, 0, 0, 0.4) 50%, 
        rgba(30, 58, 138, 0.3) 100%
    );
}

/* Logo en navbar con efectos */
.navbar-logo {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-logo:hover {
    transform: rotate(5deg) scale(1.1);
}