/**
 * Custom Styles for NCBC Website
 * Modern, Mobile-First, Responsive Design
 */

/* ========================================
   Global Styles & Typography
   ======================================== */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --transition: all 0.3s ease;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ========================================
   Section Spacing
   ======================================== */

section {
    position: relative;
}

.section-padding {
    padding: 80px 0;
}

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

/* ========================================
   Buttons & Interactive Elements
   ======================================== */

.btn {
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

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

.btn:hover:before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    transform: translateY(-2px);
}

/* ========================================
   Cards & Containers
   ======================================== */

.card {
    border: none;
    border-radius: 16px;
    transition: var(--transition);
}

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

/* ========================================
   Animations & Effects
   ======================================== */

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

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

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Images & Media
   ======================================== */

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

.img-rounded {
    border-radius: 16px;
}

.img-shadow {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Navigation Enhancements
   ======================================== */

.navbar-nav .nav-link {
    position: relative;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* ========================================
   Typography Enhancements
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 800;
}

p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #0dcaf0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Shadows & Depth
   ======================================== */

.shadow-soft {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* ========================================
   Backgrounds & Overlays
   ======================================== */

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.overlay {
    position: relative;
}

.overlay:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.overlay > * {
    position: relative;
    z-index: 2;
}

/* ========================================
   Badges & Labels
   ======================================== */

.badge {
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 0.5rem 1rem;
}

/* ========================================
   Mobile Responsiveness
   ======================================== */

@media (max-width: 991px) {
    /* Navigation */
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 12px;
        margin-top: 1rem;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
    /* Typography */
    .display-1 { font-size: 3rem !important; }
    .display-2 { font-size: 2.5rem !important; }
    .display-3 { font-size: 2rem !important; }
    .display-4 { font-size: 1.75rem !important; }
    .display-5 { font-size: 1.5rem !important; }
    .display-6 { font-size: 1.25rem !important; }
    
    /* Spacing */
    .py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    .my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }
    
    /* Social Media Icons - Force Visibility */
    .btn-icon {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .btn-icon i {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 1.25rem !important;
    }
    
    .social-icon-btn,
    .footer-social {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 768px) {
    /* Typography */
    .display-1 { font-size: 2.5rem !important; }
    .display-2 { font-size: 2rem !important; }
    .display-3 { font-size: 1.75rem !important; }
    .display-4 { font-size: 1.5rem !important; }
    .display-5 { font-size: 1.25rem !important; }
    
    /* Buttons */
    .btn-lg {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Ensure Social Icons are Always Visible */
    .btn-icon,
    .social-icon-btn,
    .footer-social {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-width: 2.5rem;
        min-height: 2.5rem;
    }
    
    .btn-icon i,
    .social-icon-btn i,
    .footer-social i {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 576px) {
    /* Container */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Buttons */
    .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group .btn {
        width: auto;
    }
    
    /* Social Icons - Exception for full width */
    .btn-icon,
    .social-icon-btn,
    .footer-social {
        display: inline-flex !important;
        width: auto !important;
        min-width: 2.5rem;
        min-height: 2.5rem;
    }
}

/* ========================================
   Accessibility
   ======================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .navbar,
    .btn,
    footer,
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
        background: white;
    }
}

/* ========================================
   Utilities
   ======================================== */

.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: all 0.3s ease;
}

.overflow-hidden {
    overflow: hidden;
}

.position-relative {
    position: relative;
}

.z-1 { z-index: 1; }
.z-2 { z-index: 2; }
.z-3 { z-index: 3; }

/* ========================================
   Social Media Icons - Force Visibility
   ======================================== */

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.5rem;
}

.social-icon-btn,
.footer-social {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.btn-icon i,
.social-icon-btn i,
.footer-social i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    line-height: 1;
}

/* ========================================
   Loading Spinner
   ======================================== */

.spinner {
    animation: spin 1s linear infinite;
}

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

/* ========================================
   Back to Top Button Enhancement
   ======================================== */

.btn-scroll-top {
    transition: var(--transition);
}

.btn-scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Events Section Specific
   ======================================== */

.event-card {
    position: relative;
    overflow: hidden;
}

.event-card: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;
}

.event-card:hover:before {
    left: 100%;
}

/* ========================================
   Contact Section Specific
   ======================================== */

.contact-info-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-info-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Performance Optimizations
   ======================================== */

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Reduce motion for users who prefer it */
@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;
    }
}

