/**
 * AfriNova Custom Styles
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.gradient-bg {
    background: linear-gradient(135deg, #005086 0%, #003d64 100%);
}

.accent-gradient {
    background: linear-gradient(135deg, #F0811D 0%, #e56a0d 100%);
}

.btn-primary {
    background-color: #005086;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 0.5rem;
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #003a5c;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 80, 134, 0.3);
}

.btn-secondary {
    background-color: #F0811D;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 0.5rem;
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #d97412;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(240, 129, 29, 0.3);
}

/* Professional shadows */
.shadow-professional {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Smooth transitions */
.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Nav logo animation */
img[alt="AfriNova"] {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Slideshow animation */
@keyframes slideIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-fade {
    animation: slideIn 1s ease-in-out;
}

/* Zoom In Animation */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1.15);
    }
}

.slide-zoom-in {
    animation: zoomIn 1s ease-out forwards;
}

/* Zoom Out Animation */
@keyframes zoomOut {
    from {
        opacity: 0;
        transform: scale(1.2);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-zoom-out {
    animation: zoomOut 1s ease-out forwards;
}

/* Card hover effects */
.card-hover {
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
    z-index: 1;
}

.card-hover:hover::before {
    left: 100%;
}

/* Button hover animation */
button {
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

button:active::after {
    width: 300px;
    height: 300px;
}

/* Perspective for 3D cards */
.perspective {
    perspective: 1000px;
}

/* Enhanced text rendering */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.5px;
}

/* Responsive text sizes */
@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }
    h2 {
        font-size: 1.875rem;
    }
}

/* Smooth scrolling for navigation */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Line clamp support */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Container optimization */
.max-w-6xl {
    max-width: 72rem;
}

/* Professional navbar styling */
nav {
    backdrop-filter: blur(10px);
    background: rgba(0, 80, 134, 0.95);
}

/* Mobile menu slide animation */
@keyframes slideFromTop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fixed.top-20.left-0 {
    animation: slideFromTop 0.3s ease-out;
}

/* Yellow glow effect on hover */
.hover\:shadow-yellow-500\/50 {
    transition: all 0.3s ease;
}

/* Nav link underline animation */
.border-b-2 {
    transition: border-color 0.3s ease;
}

/* Smooth backdrop blur */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* Button gradient animation */
button:has-class(from-purple-500) {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Mobile menu backdrop */
.fixed.inset-0.z-30 {
    transition: all 0.3s ease-out;
}

/* Responsive navbar padding */
@media (max-width: 1024px) {
    nav {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

/* Menu item active state animation */
.border-l-4 {
    transition: all 0.2s ease;
}

/* Destination card hover effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* White blush effect border for images */
.fancy-img-border {
    border: 3px solid white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.3);
}

/* Professional vignette overlay - affects edges, leaves center clear */
.slide-overlay-vignette {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at center, transparent 0%, transparent 35%, rgba(0, 80, 134, 0.15) 60%, rgba(0, 80, 134, 0.25) 100%);
    pointer-events: none;
    z-index: 5;
}

/* Bottom blue accent panel */
.slide-overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 80, 134, 0.3) 40%, rgba(0, 80, 134, 0.5) 100%);
    pointer-events: none;
    z-index: 4;
}

/* Left blue accent panel */
.slide-overlay-left {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 150px;
    background: linear-gradient(90deg, rgba(0, 80, 134, 0.4) 0%, transparent 100%);
    pointer-events: none;
    z-index: 4;
}

/* Right blue accent panel */
.slide-overlay-right {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 150px;
    background: linear-gradient(270deg, rgba(0, 80, 134, 0.4) 0%, transparent 100%);
    pointer-events: none;
    z-index: 4;
}

/* Thumbnail slider styles */
.thumbnail-btn {
    cursor: pointer;
    backdrop-filter: blur(4px);
    background-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.thumbnail-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Active thumbnail styling */
.thumbnail-btn.border-secondary {
    box-shadow: 0 0 25px rgba(240, 129, 29, 0.6), inset 0 0 10px rgba(240, 129, 29, 0.3);
}

/* Form styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #005086;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #003d64;
}

/* Link styles */
a {
    color: #005086;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #F0811D;
}

/* Utility classes for common patterns */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Spinner animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Fade animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

/* Admin Panel Mobile Optimizations */

/* Sidebar mobile collapse */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    #sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 40;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    #sidebarToggle {
        display: block !important;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 50;
        background: linear-gradient(135deg, #005086 0%, #003d64 100%);
        padding: 0.5rem;
        border-radius: 0.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }
    
    #sidebarToggle:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    }
    
    /* Main content offset for mobile */
    main {
        width: 100vw;
    }
}

/* Settings tab responsive */
@media (max-width: 640px) {
    .settings-tab {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.875rem;
    }
    
    .settings-tab i {
        margin-right: 0.25rem !important;
    }
}

/* Admin cards responsive */
@media (max-width: 768px) {
    .bg-white.rounded-lg {
        border-radius: 0.5rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

/* Form inputs mobile touch-friendly */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* Touch target size */
    }
}

/* Toggle switches mobile */
.peer:checked + label {
    position: relative;
}

/* Message container mobile */
@media (max-width: 640px) {
    #messageContainer {
        position: fixed;
        top: 5rem;
        left: 0.5rem;
        right: 0.5rem;
        z-index: 40;
    }
}

/* Grid responsive for mobile */
@media (max-width: 768px) {
    .grid {
        gap: 1rem !important;
    }
    
    .grid-cols-1 {
        grid-template-columns: 1fr;
    }
    
    .md\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .lg\\:grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Button sizes for mobile */
@media (max-width: 640px) {
    button {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

/* ========== SCROLL ANIMATIONS ========== */

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Zoom in (scale) animation */
@keyframes zoomInScale {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide up with fade */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation classes */
.scroll-animate {
    opacity: 0;
}

.scroll-animate.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.scroll-animate.slide-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.scroll-animate.slide-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.scroll-animate.zoom-in {
    animation: zoomInScale 0.8s ease-out forwards;
}

.scroll-animate.slide-up {
    animation: slideUpFade 0.8s ease-out forwards;
}

/* Staggered animation delays for multiple elements */
.scroll-animate.delay-100 {
    animation-delay: 0.1s;
}

.scroll-animate.delay-200 {
    animation-delay: 0.2s;
}

.scroll-animate.delay-300 {
    animation-delay: 0.3s;
}

.scroll-animate.delay-400 {
    animation-delay: 0.4s;
}