/* ============================================================
   Golden Inspires Foundation - Custom Styles
   ============================================================ */

/* ============================================================
   Base Styles & Reset
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

/* ============================================================
   Selection Color
   ============================================================ */
::selection {
    background-color: #d62828;
    color: white;
}

/* ============================================================
   Glassmorphism Utility
   ============================================================ */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ============================================================
   3D Hover Effects
   ============================================================ */
.hover-3d {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.hover-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(-5deg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hover-3d-sm:hover {
    transform: translateY(-5px) rotateX(3deg) rotateY(-3deg);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   Card Styles
   ============================================================ */
.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hero-slider {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* ============================================================
   Animated Counter
   ============================================================ */
.counter-box {
    position: relative;
    overflow: hidden;
}

.counter-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d62828, #fcbf49, #2a9d8f);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.counter-box:hover::before {
    transform: translateX(0);
}

/* ============================================================
   Button Styles
   ============================================================ */
.btn-primary {
    background: linear-gradient(135deg, #d62828 0%, #b91c1c 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(214, 40, 40, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(214, 40, 40, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #fcbf49 0%, #f59e0b 100%);
    color: #1a1a1a;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(252, 191, 73, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(252, 191, 73, 0.4);
}

.btn-outline {
    background: transparent;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
}

.btn-outline:hover {
    border-color: white;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* ============================================================
   Section Styles
   ============================================================ */
.section-padding {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 3rem 0;
    }
}

/* ============================================================
   Gallery Hover Effects
   ============================================================ */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-expand {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    color: white;
    background: rgba(214, 40, 40, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-expand {
    transform: translate(-50%, -50%) scale(1);
}

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: white;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    transition: opacity 0.3s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.lightbox-close:hover {
    opacity: 0.7;
    background: rgba(255,255,255,0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    background: rgba(255,255,255,0.1);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* ============================================================
   Team Member Cards
   ============================================================ */
.team-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: white;
    transition: all 0.3s ease;
}

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

.team-card .team-social {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.team-card:hover .team-social {
    transform: translateY(0);
}

/* ============================================================
   Testimonial Cards
   ============================================================ */
.testimonial-card {
    position: relative;
    padding: 2rem;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

.testimonial-card::before {
    content: '"';
    font-size: 6rem;
    position: absolute;
    top: -0.5rem;
    left: 1.5rem;
    color: rgba(214, 40, 40, 0.1);
    font-family: serif;
    line-height: 1;
}

/* ============================================================
   Navigation Scroll Effect
   ============================================================ */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   Donate Page Styles
   ============================================================ */
.donate-amount-btn {
    transition: all 0.3s ease;
    cursor: pointer;
}

.donate-amount-btn.active {
    background: #d62828;
    color: white;
    border-color: #d62828;
    box-shadow: 0 4px 12px rgba(214, 40, 40, 0.3);
}

/* ============================================================
   Event Timeline
   ============================================================ */
.event-timeline {
    position: relative;
}

.event-timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #d62828, #fcbf49, #2a9d8f);
}

@media (max-width: 768px) {
    .event-timeline::before {
        left: 1rem;
    }
}

/* ============================================================
   Blog Card Styles
   ============================================================ */
.blog-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

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

.blog-card .blog-image img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 240px;
    object-fit: cover;
}

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

/* ============================================================
   Animated Background
   ============================================================ */
.animated-bg {
    background: linear-gradient(-45deg, #d62828, #fcbf49, #2a9d8f, #d62828);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

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

/* ============================================================
   Scroll Reveal
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* ============================================================
   Loading Animation
   ============================================================ */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d62828;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   Page Header
   ============================================================ */
.page-header {
    position: relative;
    padding: 8rem 0 5rem;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
}

/* ============================================================
   Form Styles
   ============================================================ */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #d62828;
    box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

/* ============================================================
   Pulse Animation
   ============================================================ */
.pulse-ring {
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(214, 40, 40, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(214, 40, 40, 0); }
    100% { box-shadow: 0 0 0 0 rgba(214, 40, 40, 0); }
}

/* ============================================================
   Responsive Tables
   ============================================================ */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================================
   Accessibility
   ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid #d62828;
    outline-offset: 2px;
}

/* ============================================================
   Print Styles
   ============================================================ */
@media print {
    .no-print { display: none; }
    body { font-size: 12pt; }
}

/* ============================================================
   Image Loading Placeholder
   ============================================================ */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================================
   Custom Scroll Animation Delays
   ============================================================ */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }
.delay-700 { transition-delay: 0.7s; }
