/* ===== Main Styles ===== */

/* Fix for Font Awesome Icons */
.fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-light, .fa-thin, .fa-duotone, .fa-brands {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

/* Fallback CSS Icons if Font Awesome fails */
.icon-fallback {
    display: inline-block;
    width: 1em;
    height: 1em;
    text-align: center;
}

/* Bootstrap Icons alternative classes */
.bi {
    font-family: 'bootstrap-icons' !important;
}

/* Icon alternatives using Unicode */
.fa-home:before, .fas.fa-home:before { content: "🏠"; }
.fa-envelope:before, .fas.fa-envelope:before { content: "✉️"; }
.fa-phone:before, .fas.fa-phone:before { content: "📞"; }
.fa-user:before, .fas.fa-user:before { content: "👤"; }
.fa-users:before, .fas.fa-users:before { content: "👥"; }
.fa-cogs:before, .fas.fa-cogs:before { content: "⚙️"; }
.fa-info-circle:before, .fas.fa-info-circle:before { content: "ℹ️"; }
.fa-language:before, .fas.fa-language:before { content: "🌐"; }
.fa-list:before, .fas.fa-list:before { content: "📋"; }
.fa-flag:before, .fas.fa-flag:before { content: "🏳️"; }
.fa-bullseye:before, .fas.fa-bullseye:before { content: "🎯"; }
.fa-eye:before, .fas.fa-eye:before { content: "👁️"; }
.fa-building:before, .fas.fa-building:before { content: "🏢"; }

/* Global Variables - Youth Development Association Theme */
:root {
    /* YDA Primary Colors */
    --primary-color: #6CB44D;
    --secondary-color: #F5C300;
    --success-color: #7EC45E;
    --info-color: #A67C52;
    --warning-color: #FFD633;
    --danger-color: #dc3545;
    --light-color: #F2F2F2;
    --dark-color: #222222;
    
    /* YDA Gradients */
    --gradient-primary: linear-gradient(135deg, #6CB44D, #7EC45E);
    --gradient-secondary: linear-gradient(135deg, #F5C300, #FFD633);
    --gradient-hero: linear-gradient(135deg, rgba(108, 180, 77, 0.95), rgba(245, 195, 0, 0.85));
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(108, 180, 77, 0.1);
    --shadow-md: 0 5px 20px rgba(108, 180, 77, 0.15);
    --shadow-lg: 0 10px 30px rgba(108, 180, 77, 0.2);
    
    /* Border & Transitions */
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.7;
    color: #222222;
    overflow-x: hidden;
    background-color: #FFFFFF;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #6CB44D;
}

.display-4 {
    font-weight: 700;
}

p {
    margin-bottom: 1.2rem;
    color: #555;
}

.lead {
    font-size: 1.2rem;
    font-weight: 300;
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: var(--transition);
    text-transform: none;
    position: relative;
    overflow: hidden;
}

.btn::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:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

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

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

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

.card-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}

.card-img-top {
    transition: var(--transition);
}

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(59, 122, 59, 0.95), rgba(245, 195, 0, 0.85)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="100"><ellipse cx="25" cy="25" rx="3" ry="1.5" fill="rgba(255,255,255,0.15)" transform="rotate(45 25 25)"/><ellipse cx="75" cy="75" rx="2.5" ry="1.2" fill="rgba(245,195,0,0.2)" transform="rotate(45 75 75)"/><circle cx="50" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(108, 180, 77, 0.3), rgba(245, 195, 0, 0.2));
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
}

/* News Carousel */
.news-carousel .carousel-item {
    height: 500px;
    position: relative;
}

.news-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.carousel-caption {
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    text-align: start;
}

[dir="rtl"] .carousel-caption {
    text-align: start;
}

.carousel-caption h5 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.carousel-caption p {
    font-size: 1.1rem;
    color: #f8f9fa;
    margin-bottom: 0;
}

/* Statistics Section */
.statistics-section {
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.statistics-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="60" cy="30" r="1.5" fill="rgba(255,255,255,0.08)"/></svg>');
    animation: float 20s infinite linear;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: #e3f2fd;
    margin-top: 0.5rem;
}

.stat-icon {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    opacity: 0.9;
}

/* About Section */
.about-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    position: relative;
}

.about-content {
    padding: 4rem 0;
}

.about-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.about-image img {
    width: 100%;
    height: auto;
    transition: var(--transition);
}

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

/* Section Titles */
.section-title {
    position: relative;
    display: inline-block;
    font-weight: 700;
    color: #6CB44D;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateX(-100px) translateY(-100px) rotate(0deg);
    }
    100% {
        transform: translateX(100px) translateY(100px) rotate(360deg);
    }
}

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

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

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

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease;
}

.slide-in-right {
    animation: slideInRight 0.8s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        background-attachment: scroll;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .news-carousel .carousel-item {
        height: 300px;
    }
    
    .carousel-caption {
        padding: 2rem 1rem;
    }
    
    .carousel-caption h5 {
        font-size: 1.3rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .stat-item {
        padding: 1.5rem 0.5rem;
    }
}

/* 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: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}
