/* Written by Levish Coders. © 2026 UCH All rights reserved. */

/* Custom CSS Variables */
:root {
    --primary-green: #2d5016;
    --secondary-green: #4a7c28;
    --accent-green: #6fbf40;
    --maroon: #800020;
    --light-maroon: #b22222;
    --cream: #f8f9fa;
    --dark-gray: #2c3e50;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

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

/* Navigation Styles */
#navbar {
    backdrop-filter: blur(10px);
    background: rgba(45, 80, 22, 0.95) !important;
    transition: var(--transition-smooth);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

#navbar.scrolled {
    background: rgba(45, 80, 22, 0.98) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    transition: var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-green);
    transition: width 0.3s ease;
}

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

/* Container for consistent width across all sections */
.container, .content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Navigation Container */
.nav-container {
    max-width: 1400px;
    padding: 0 24px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Navigation flex container */
.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-width: 0;
}

/* Desktop Menu */
.desktop-menu {
    display: none;
    flex-shrink: 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .desktop-menu {
        display: flex;
        gap: 1.5rem;
    }
}

/* Mobile Menu Button */
#mobile-menu-btn {
    @apply flex items-center justify-center w-12 h-12 rounded-lg hover:bg-green-700 transition-colors;
    position: relative;
    z-index: 60;
    flex-shrink: 0;
    display: flex !important;
    min-width: 48px;
    min-height: 48px;
}

#mobile-menu-btn i {
    @apply text-2xl;
}

/* Hide mobile menu button on desktop */
@media (min-width: 768px) {
    #mobile-menu-btn {
        display: none !important;
    }
}

/* Mobile Menu */
#mobile-menu {
    @apply bg-green-800;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

#mobile-menu.active {
    max-height: 500px;
    overflow: visible;
}

#mobile-menu .nav-link {
    @apply block px-6 py-3 text-green-200 hover:text-white hover:bg-green-700 transition-all;
    text-align: center;
}

/* Hero Section Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(111, 191, 64, 0.3); }
    50% { box-shadow: 0 0 40px rgba(111, 191, 64, 0.6); }
}

.hero-logo {
    animation: float 3s ease-in-out infinite;
}

/* Image Slider Styles */
.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    max-width: 1400px;
    margin: 0 auto;
}

.slide {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slider-dot {
    transition: var(--transition-smooth);
}

.slider-dot.active {
    background: var(--accent-green) !important;
    transform: scale(1.3);
}

/* Gallery Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.gallery-item img {
    transition: transform 0.5s ease;
}

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

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(45, 80, 22, 0.8), rgba(128, 0, 32, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* Form Styles */
form {
    position: relative;
}

input, textarea, select {
    transition: var(--transition-smooth);
    border: 2px solid transparent;
    background: var(--cream);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(111, 191, 64, 0.1);
    outline: none;
}

button[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button[type="submit"]:hover::before {
    width: 300px;
    height: 300px;
}

/* Card Hover Effects */
.card-hover {
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

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

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

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

/* 3D Transform Effects */
@keyframes rotate-3d {
    0% { transform: perspective(1000px) rotateY(0deg); }
    100% { transform: perspective(1000px) rotateY(360deg); }
}

.rotate-3d {
    animation: rotate-3d 10s linear infinite;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 80, 22, 0.7);
}

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

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

/* Footer Styles */
footer {
    background: linear-gradient(135deg, var(--primary-green), var(--maroon));
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(135deg, transparent 50%, var(--primary-green) 50%);
}

/* Social Media Icons */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.social-icon:hover {
    background: var(--accent-green);
    transform: translateY(-3px);
}

/* Admin Dashboard Styles */
.admin-dashboard {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.admin-card {
    background: linear-gradient(135deg, var(--cream), white);
    border: 1px solid rgba(111, 191, 64, 0.2);
    transition: var(--transition-smooth);
}

.admin-card:hover {
    border-color: var(--accent-green);
    box-shadow: 0 10px 30px rgba(111, 191, 64, 0.2);
}

/* Facial Recognition Scan */
@keyframes scan {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

.scanning {
    animation: scan 2s ease-in-out infinite;
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-green), transparent);
    animation: scan 2s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll to Top Button */
#scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 1000;
}

#scroll-top:hover {
    background: var(--secondary-green);
    transform: translateY(-5px);
}

#scroll-top.visible {
    display: flex;
}

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

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-green);
    border-radius: 5px;
}

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

/* Text Animations */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--accent-green);
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent-green); }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(45deg, var(--primary-green), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 5px solid var(--accent-green);
}

.notification.error {
    border-left: 5px solid var(--light-maroon);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--cream);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--secondary-green));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-gray);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--cream) 25%, rgba(111, 191, 64, 0.1) 50%, var(--cream) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

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

/* Special Effects */
.sparkle {
    position: relative;
}

.sparkle::before,
.sparkle::after {
    content: '✨';
    position: absolute;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle::before {
    top: -10px;
    left: -10px;
    animation-delay: 0s;
}

.sparkle::after {
    bottom: -10px;
    right: -10px;
    animation-delay: 1s;
}

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