/* Custom Styles for Cámara de Comercio de Nueva Cajamarca */

* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Logo styles */
nav img[src="logo.png"] {
    transition: transform 0.3s ease;
}

nav img[src="logo.png"]:hover {
    transform: scale(1.05);
}

footer img[src="logo.png"] {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

@media (max-width: 640px) {
    nav img[src="logo.png"] {
        height: 3rem;
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Navigation link active state */
.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #1976D2;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Benefit cards hover effect */
.benefit-card {
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-10px);
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #4CAF50;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #81C784;
    transform: translateY(-5px);
}

/* Smooth section transitions */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #81C784;
}

/* Form focus states */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

#mobile-menu.active {
    max-height: 500px;
}

/* Hero section - sin animación de gradiente */
#inicio {
    position: relative;
}

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

/* Image placeholder */
.img-placeholder {
    background: #1976D2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Button ripple effect */
button,
.btn {
    position: relative;
    overflow: hidden;
}

button::after,
.btn::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;
}

button:active::after,
.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Responsive text */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
}

/* Company cards hover effect */
.company-card {
    transition: all 0.3s ease;
}

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

/* Modal styles */
#companyModal {
    backdrop-filter: blur(4px);
}

#companyModal .bg-white {
    animation: modalSlideIn 0.3s ease-out;
}

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

/* Gallery item styles */
.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* Animation for filtered companies */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    nav,
    footer,
    .scroll-to-top,
    #companyModal {
        display: none;
    }
}
