/* =========================================
   CUSTOM STYLES FOR FUNDACIÓN PARQUES NACIONALES
   - Navbar transparente con efecto scroll
   - Complementario a Bootstrap 5.3
   ========================================= */

/* ROOT VARIABLES */
:root {
    --fpn-primary: #22c55e;
    --fpn-secondary: #16a34a;
    --fpn-success: #22c55e;
    --fpn-dark: #1f2937;
    --fpn-light: #f8fafc;
    --fpn-donation: #e91e63;
    --fpn-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --fpn-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --fpn-border-radius: 0.5rem;
    --fpn-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* CARD HOVER EFFECTS */
.hover-lift {
    transition: var(--fpn-transition);
    transform: translateY(0);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--fpn-shadow-lg);
}

.hover-lift .card-body {
    transition: var(--fpn-transition);
}

.hover-lift:hover .card-body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* GLOBAL STYLES */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #374151;
    scroll-behavior: smooth;
}

/* Footer styles para eliminar espacios y bordes */
footer {
    margin: 0 !important;
    padding: 3rem 0 1rem 0 !important;
    border: none !important;
    outline: none !important;
}

/* Asegurar que no haya espacios después del footer */
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Eliminar bordes del contenedor del footer */
footer .container {
    border: none !important;
    outline: none !important;
}

/* Back to Top Button */
#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* =================================
   NAVBAR TRANSPARENTE CON SCROLL EFFECT
   ================================= */

/* Base Navbar Styles */
.navbar {
    transition: var(--fpn-transition);
    padding: 1.5rem 0;
    z-index: 1050;
}

/* Estado inicial: Navbar Transparente */
.navbar-transparent {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* Estado scroll: Navbar con fondo blanco */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Brand Logo */
.navbar-brand {
    font-weight: 700;
    transition: var(--fpn-transition);
}

.navbar-brand img {
    height: 50px;
    transition: var(--fpn-transition);
}

.navbar-scrolled .navbar-brand img {
    height: 45px;
}

/* Nav Links - Estado Transparente */
.navbar-transparent .nav-link {
    color: white !important;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    transition: var(--fpn-transition);
}

.navbar-transparent .nav-link:hover {
    color: #a7f3d0 !important;
    transform: translateY(-1px);
}

/* Nav Links - Estado Scrolled */
.navbar-scrolled .nav-link {
    color: #374151 !important;
    font-weight: 600;
    text-shadow: none;
    position: relative;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    transition: var(--fpn-transition);
}

.navbar-scrolled .nav-link:hover {
    color: var(--fpn-primary) !important;
    transform: translateY(-1px);
}

/* Underline effect for nav links */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: currentColor;
    transition: var(--fpn-transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    border: none;
    box-shadow: var(--fpn-shadow-lg);
    border-radius: var(--fpn-border-radius);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    background-color: white;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: var(--fpn-transition);
    font-weight: 500;
    color: #374151;
}

.dropdown-item:hover {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--fpn-primary);
}

/* Navbar Toggler */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--fpn-border-radius);
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Icono del toggler para navbar transparente */
.navbar-transparent .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Icono del toggler para navbar scrolled */
.navbar-scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Donate Button */
.btn-donate {
    background: linear-gradient(45deg, var(--fpn-donation), #ad1457) !important;
    color: white !important;
    border: none;
    border-radius: 25px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--fpn-transition);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
    font-size: 0.9rem;
}

.btn-donate:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4) !important;
    background: linear-gradient(45deg, #ad1457, var(--fpn-donation)) !important;
    color: white !important;
}

/* Mobile navbar styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: var(--fpn-border-radius);
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: var(--fpn-shadow-lg);
    }
    
    .navbar-transparent .navbar-collapse .nav-link,
    .navbar-scrolled .navbar-collapse .nav-link {
        color: #374151 !important;
        text-shadow: none;
    }
    
    .navbar-transparent .navbar-collapse .nav-link:hover,
    .navbar-scrolled .navbar-collapse .nav-link:hover {
        color: var(--fpn-primary) !important;
    }
}

/* =================================
   HERO SECTION
   ================================= */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-overlay {
    background: linear-gradient(
        45deg,
        rgba(34, 197, 94, 0.3) 0%,
        rgba(22, 163, 74, 0.4) 100%
    );
    z-index: 2;
}

.hero-overlay h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
}

.hero-overlay h3 {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-overlay .btn {
    animation: fadeInUp 1s ease-out 0.6s both;
    box-shadow: var(--fpn-shadow);
}

/* =================================
   ESTADÍSTICAS MEJORADAS
   ================================= */
.bg-gradient-light {
    background: linear-gradient(135deg, #f8fafc 0%, #f0fdf4 100%);
    position: relative;
    overflow: hidden;
}

.bg-gradient-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 10% 20%, rgba(34, 197, 94, 0.1) 0%, transparent 30%),
                radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 30%);
    z-index: 0;
}

.stats-card {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    border: 1px solid rgba(34, 197, 94, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #22c55e, #10b981);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.stats-card:hover::before {
    transform: scaleX(1);
}

.icon-container {
    position: relative;
    display: inline-block;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card:hover .icon-container {
    transform: scale(1.2) rotate(5deg);
}

.icon-container i {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #22c55e, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card:hover .icon-container i {
    transform: scale(1.1);
}

.counter {
    position: relative;
    display: inline-block;
    font-weight: 700;
    background: linear-gradient(135deg, #22c55e, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card:hover .counter {
    letter-spacing: 1px;
}

.counter::after {
    content: '%';
    font-size: 0.6em;
    position: absolute;
    top: 0.5em;
    right: -0.8em;
    background: linear-gradient(135deg, #22c55e, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.progress {
    height: 8px !important;
    border-radius: 4px;
    background-color: rgba(34, 197, 94, 0.1);
    overflow: visible;
    position: relative;
}

.progress-bar {
    position: relative;
    border-radius: 4px;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.6) 50%, 
        rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: shine 2s infinite;
}

@keyframes shine {
    100% {
        transform: translateX(100%);
    }
}

/* =================================
   BUTTON STYLES
   ================================= */
.btn {
    border-radius: var(--fpn-border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--fpn-transition);
    border: none;
    text-decoration: none !important;
}

.btn-success {
    background: linear-gradient(135deg, var(--fpn-primary) 0%, var(--fpn-secondary) 100%);
    box-shadow: var(--fpn-shadow);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--fpn-secondary) 0%, #15803d 100%);
    transform: translateY(-2px);
    box-shadow: var(--fpn-shadow-lg);
}

.btn-outline-success {
    border: 2px solid var(--fpn-primary);
    color: var(--fpn-primary);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--fpn-primary);
    border-color: var(--fpn-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* =================================
   CARD STYLES
   ================================= */
.card {
    border: none;
    border-radius: var(--fpn-border-radius);
    overflow: hidden;
    transition: var(--fpn-transition);
}

.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--fpn-shadow-lg);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: var(--fpn-transition);
}

.hover-card:hover .card-img-top {
    transform: scale(1.05);
}

/* =================================
   PROJECT FILTERS
   ================================= */
.btn-group .btn-check:checked + .btn {
    background: var(--fpn-primary);
    border-color: var(--fpn-primary);
    color: white;
}

/* =================================
   DONATION SECTION
   ================================= */
.donation-amount.btn-success {
    background: var(--fpn-primary);
    border-color: var(--fpn-primary);
    color: white;
}

.donation-amount:not(.btn-success):hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--fpn-primary);
    color: var(--fpn-primary);
}

/* =================================
   FOOTER STYLES
   ================================= */
footer {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
}

footer h5 {
    position: relative;
    padding-bottom: 0.5rem;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--fpn-primary);
}

footer .social-links a:hover {
    color: var(--fpn-primary) !important;
    transform: translateY(-2px);
}

/* =================================
   BACK TO TOP BUTTON
   ================================= */
#back-to-top {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    box-shadow: var(--fpn-shadow-lg);
    transition: var(--fpn-transition);
}

#back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.2);
}

/* =================================
   TOAST STYLES
   ================================= */
.toast {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    box-shadow: var(--fpn-shadow-lg);
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */
@media (max-width: 768px) {
    .hero {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-overlay h1 {
        font-size: 2rem !important;
    }
    
    .hero-overlay h3 {
        font-size: 1.25rem !important;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
    }
    
    .navbar-transparent,
    .navbar-scrolled {
        padding: 1rem 0;
    }
}

@media (max-width: 576px) {
    .hero-overlay .btn {
        font-size: 0.9rem;
        padding: 0.625rem 1.25rem;
    }
    
    .display-4 {
        font-size: 1.75rem !important;
    }
    
    .display-5 {
        font-size: 1.5rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .navbar-brand img {
        height: 40px;
    }
}

/* =================================
   ACCESSIBILITY
   ================================= */
@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;
    }
}

/* Focus styles */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(34, 197, 94, 0.25);
    border-color: var(--fpn-primary);
}

/* =================================
   UTILITY CLASSES
   ================================= */
.text-fpn-primary { color: var(--fpn-primary) !important; }
.bg-fpn-primary { background-color: var(--fpn-primary) !important; }
.border-fpn-primary { border-color: var(--fpn-primary) !important; }

.img-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.shadow-soft {
    box-shadow: var(--fpn-shadow);
}

.shadow-soft-lg {
    box-shadow: var(--fpn-shadow-lg);
}

.transition-all {
    transition: var(--fpn-transition);
}

/* =================================
   CUSTOM SCROLLBAR
   ================================= */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--fpn-secondary);
}

/* =================================
   LOADING STATES
   ================================= */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(34, 197, 94, 0.2),
        transparent
    );
    animation: loading 2s infinite;
}

@keyframes loading {
    100% {
        transform: translateX(100%);
    }
}

/* =================================
   PRINT STYLES
   ================================= */
@media print {
    .navbar,
    .hero,
    footer,
    #back-to-top {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* =================================
   HIGH CONTRAST MODE
   ================================= */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid;
    }
}