/**
 * Abua Odual Diaspora Inc - Main Stylesheet
 * Custom styles beyond Tailwind CSS
 */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Page loader */
#page-loader {
    opacity: 1;
    visibility: visible;
}
#page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Sticky navigation */
#main-nav.scrolled .nav-main {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-bottom-color: rgba(226, 232, 240, 0.8);
}
#main-nav.scrolled .top-bar {
    max-height: 0;
    opacity: 0;
}

/* Mobile menu animation */
#mobile-menu.open {
    max-height: 500px;
}

/* Nav link underline */
.nav-link.active::after {
    width: 75%;
}

/* Hero gradient overlay */
.hero-overlay {
    background: linear-gradient(135deg, rgba(26, 93, 58, 0.95) 0%, rgba(15, 45, 28, 0.85) 50%, rgba(10, 30, 18, 0.75) 100%);
}

/* Animated counters */
.counter-value {
    font-variant-numeric: tabular-nums;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.card-lift {
    transition: all 0.3s ease;
}
.card-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
}

/* Image zoom */
.img-zoom {
    overflow: hidden;
}
.img-zoom img {
    transition: transform 0.6s ease;
}
.img-zoom:hover img {
    transform: scale(1.08);
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, #1a5d3a, #c8a45c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient border */
.gradient-border {
    position: relative;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #1a5d3a, #c8a45c);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Custom animations */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(26, 93, 58, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(26, 93, 58, 0); }
}
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out forwards;
}
.animate-slide-up {
    animation: slide-up 0.6s ease-out forwards;
}
.animate-slide-in-right {
    animation: slide-in-right 0.5s ease-out forwards;
}
.animate-float {
    animation: float 3s ease-in-out infinite;
}
.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}
.animate-spin-slow {
    animation: spin-slow 8s linear infinite;
}

/* Toast notifications */
.toast {
    pointer-events: auto;
    animation: toast-in 0.3s ease-out forwards;
}
@keyframes toast-in {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
.toast-out {
    animation: toast-out 0.3s ease-in forwards;
}
@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* Lightbox */
#lightbox {
    transition: opacity 0.3s ease;
}
#lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
#lightbox.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Blog content styling */
.blog-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.blog-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.blog-content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: #334155;
}
.blog-content ul, .blog-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.75rem;
}
.blog-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}
.blog-content a {
    color: #1a5d3a;
    text-decoration: underline;
    font-weight: 500;
}
.blog-content a:hover {
    color: #155230;
}
.blog-content blockquote {
    border-left: 4px solid #1a5d3a;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #475569;
}
.blog-content img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    max-width: 100%;
    height: auto;
}
.blog-content iframe {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    max-width: 100%;
}

/* Form inputs */
.form-input {
    @apply w-full px-4 py-3 rounded-xl border border-slate-200 bg-white text-slate-800 placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-all;
}
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(26, 93, 58, 0.1);
}

/* Button primary gradient */
.btn-primary {
    @apply inline-flex items-center justify-center gap-2 px-6 py-3 bg-primary-600 text-white font-semibold rounded-xl hover:bg-primary-700 transition-all hover:shadow-lg hover:shadow-primary-500/25 active:scale-[0.98];
}

/* Section badge */
.section-badge {
    @apply inline-flex items-center gap-2 px-4 py-1.5 bg-primary-50 text-primary-700 text-sm font-medium rounded-full border border-primary-100;
}

/* Gallery masonry */
.gallery-masonry {
    columns: 1;
    column-gap: 1rem;
}
@media (min-width: 640px) { .gallery-masonry { columns: 2; } }
@media (min-width: 1024px) { .gallery-masonry { columns: 3; } }
@media (min-width: 1280px) { .gallery-masonry { columns: 4; } }

.gallery-masonry .masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
}

/* Timeline */
.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #1a5d3a, #c8a45c);
}

/* Custom select */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Stats counter */
.stat-card {
    @apply bg-white rounded-2xl p-6 shadow-sm border border-slate-100 text-center;
    transition: all 0.3s ease;
}
.stat-card:hover {
    @apply shadow-md border-primary-100;
    transform: translateY(-2px);
}

/* Team card */
.team-card {
    @apply bg-white rounded-2xl overflow-hidden shadow-sm border border-slate-100;
    transition: all 0.4s ease;
}
.team-card:hover {
    @apply shadow-xl border-primary-100;
    transform: translateY(-6px);
}
.team-card .team-img {
    transition: transform 0.5s ease;
}
.team-card:hover .team-img {
    transform: scale(1.05);
}
.team-card .team-social {
    @apply opacity-0 translate-y-2;
    transition: all 0.3s ease;
}
.team-card:hover .team-social {
    @apply opacity-100 translate-y-0;
}

/* Event card */
.event-card {
    @apply bg-white rounded-2xl overflow-hidden shadow-sm border border-slate-100 flex flex-col;
    transition: all 0.3s ease;
}
.event-card:hover {
    @apply shadow-lg border-primary-100;
    transform: translateY(-4px);
}

/* Testimonial card */
.testimonial-card {
    @apply bg-white rounded-2xl p-6 shadow-sm border border-slate-100 relative;
}
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: #1a5d3a;
    opacity: 0.15;
    font-family: Georgia, serif;
    line-height: 1;
}

/* Blog card */
.blog-card {
    @apply bg-white rounded-2xl overflow-hidden shadow-sm border border-slate-100 flex flex-col h-full;
    transition: all 0.4s ease;
}
.blog-card:hover {
    @apply shadow-xl border-primary-100;
    transform: translateY(-6px);
}
.blog-card .blog-img {
    transition: transform 0.6s ease;
}
.blog-card:hover .blog-img {
    transform: scale(1.05);
}

/* Project card */
.project-card {
    @apply relative rounded-2xl overflow-hidden group;
}
.project-card .project-overlay {
    @apply absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent;
    transition: opacity 0.4s ease;
}
.project-card .project-content {
    @apply absolute bottom-0 left-0 right-0 p-6;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}
.project-card:hover .project-content {
    transform: translateY(0);
}

/* Service card */
.service-card {
    @apply bg-white rounded-2xl p-8 shadow-sm border border-slate-100 text-center;
    transition: all 0.4s ease;
}
.service-card:hover {
    @apply shadow-xl border-primary-100;
    transform: translateY(-8px);
}
.service-card .service-icon {
    @apply w-16 h-16 mx-auto rounded-2xl bg-primary-50 text-primary-600 flex items-center justify-center mb-6;
    transition: all 0.4s ease;
}
.service-card:hover .service-icon {
    @apply bg-primary-600 text-white;
    transform: scale(1.1);
}

/* FAQ accordion */
.faq-item {
    @apply border border-slate-200 rounded-xl overflow-hidden;
    transition: border-color 0.3s ease;
}
.faq-item.active {
    @apply border-primary-300;
}
.faq-question {
    @apply w-full flex items-center justify-between p-5 text-left font-medium text-slate-800 hover:bg-slate-50 transition-colors;
}
.faq-answer {
    @apply overflow-hidden transition-all duration-300;
    max-height: 0;
    opacity: 0;
}
.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
}
.faq-item.active .faq-icon {
    transform: rotate(180deg);
}
.faq-icon {
    transition: transform 0.3s ease;
}

/* Loading skeleton */
.skeleton {
    @apply bg-slate-200 rounded;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}
@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #1a5d3a;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    #main-nav, footer, #back-to-top, #scroll-progress, .no-print {
        display: none !important;
    }
    main {
        padding-top: 0 !important;
    }
}
