/* ========================================
   Custom Styles for Junay Expeditions
   ======================================== */

/* Base Styles */
:root {
    /* Brand colors updated to green palette */
    --primary: #16A34A;
    --primary-hover: #15803D;
    --secondary: #22C55E;
    --accent: #064E3B;
    --dark: #022C22;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Jost', sans-serif;
    color: var(--gray-800);
    background-color: var(--white);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

.font-sans {
    font-family: 'Jost', sans-serif;
}

/* Header Styles */
header {
    transition: all 0.3s ease;
}

header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* Language Dropdown */
#lang-dropdown {
    animation: fadeIn 0.2s ease;
}

#lang-switcher:hover + #lang-dropdown,
#lang-dropdown:hover {
    display: block;
}

/* Hero Section */
.hero-slider {
    position: relative;
}

.hero-slide {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-slider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    .hero-content h1 {
        font-size: 5rem;
    }
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--white);
    cursor: pointer;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--accent);
}

/* Tailwind utility overrides for brand green */
.bg-primary {
    background-color: #16A34A !important;
}

.hover\:bg-primaryHover:hover {
    background-color: #15803D !important;
}

.text-primary {
    color: #16A34A !important;
}

.border-primary {
    border-color: #16A34A !important;
}

/* Make all dark section/footers use green accent instead of navy */
.bg-\[\#1a1a2e\] {
    background-color: #064E3B !important;
}

/* Fleet Section */
.fleet-tab {
    transition: all 0.3s ease;
}

.fleet-tab.active {
    background-color: var(--primary);
    color: var(--white);
}

.fleet-item {
    transition: all 0.3s ease;
}

.fleet-item:hover {
    transform: translateY(-5px);
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Package Cards */
.package-card {
    transition: all 0.3s ease;
}

.package-card:hover {
    transform: translateY(-5px);
}

.package-card img {
    transition: all 0.5s ease;
}

.package-card:hover img {
    transform: scale(1.1);
}

/* Testimonial Cards */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* FAQ Accordion */
.faq-item {
    transition: all 0.3s ease;
}

.faq-question {
    cursor: pointer;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    display: block;
    animation: slideDown 0.3s ease;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scroll Animations */
.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-slide-up {
    animation: slideUp 0.5s ease;
}

.animate-bounce-slow {
    animation: bounce 3s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Top Button */
#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top:hover {
    transform: translateY(-3px);
}

/* Floating WhatsApp */
.floating-whatsapp {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-2xl);
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
}

/* Section Styles */
.section-padding {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title span {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-top: 0.5rem;
}

/* Mobile Menu */
#mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.mobile-menu-open {
    display: block !important;
}

/* Counter Stats */
.counter-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

/* Responsive Images */
.img-cover {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2xl);
}

/* Parallax Background */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Gradient Overlays */
.gradient-overlay {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: var(--primary);
    color: var(--white);
}

.badge-secondary {
    background-color: var(--secondary);
    color: var(--white);
}

.badge-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Selection Color */
::selection {
    background-color: var(--primary);
    color: var(--white);
}

/* Image Lazy Loading */
img[loading="lazy"] {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Smooth Scroll Anchor Offset */
html {
    scroll-padding-top: 100px;
}

/* Header: stay visible when scrolling; compact mode */
header#header.sticky,
header#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

header#header.header-scrolled {
    box-shadow: var(--shadow-lg);
}

header#header.header-scrolled .header-top-bar {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
}

header#header .brand-tagline {
    opacity: 1;
    max-height: 2rem;
    transition: opacity 0.25s ease;
}

header#header.header-scrolled .logo-img {
    height: 2.75rem;
}

header#header.header-scrolled .nav-main-row {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Dowa-inspired welcome block */
.welcome-section {
    background: linear-gradient(180deg, #f8faf6 0%, #ffffff 100%);
}

.welcome-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.75rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
}

/* Safari teaser cards */
.safari-teaser {
    background: var(--white);
    border: 1px solid rgba(6, 78, 59, 0.09);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 12px 28px -24px rgba(2, 44, 34, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    height: 100%;
}

.safari-teaser:hover {
    transform: translateY(-4px);
    border-color: rgba(22, 163, 74, 0.35);
    box-shadow: 0 22px 40px -26px rgba(2, 44, 34, 0.55);
}

.safari-teaser-link-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    color: inherit;
}

.safari-teaser-img {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.safari-teaser-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.safari-teaser:hover .safari-teaser-img img {
    transform: scale(1.06);
}

.safari-teaser-days {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(2, 44, 34, 0.88);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
}

.safari-teaser-badge {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.94);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.3rem 0.65rem;
    border-radius: 9999px;
    box-shadow: var(--shadow-sm);
}

.safari-teaser-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1rem 1.15rem 1.15rem;
}

.safari-teaser-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    min-height: 1.25rem;
    margin-bottom: 0.45rem;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.safari-teaser-meta span {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.safari-teaser-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.safari-teaser-summary {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.safari-teaser-highlights {
    display: grid;
    gap: 0.35rem;
    margin: auto 0 1rem;
}

.safari-teaser-highlights li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--gray-700);
    font-size: 0.82rem;
}

.safari-teaser-highlights i {
    display: inline-flex;
    flex: 0 0 1rem;
    width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: rgba(22, 163, 74, 0.12);
    color: var(--primary);
    font-size: 0.58rem;
}

.safari-teaser-cta {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 700;
}

.safari-region-tabs button.active {
    background-color: var(--primary);
    color: var(--white);
}

.safari-packages-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .safari-packages-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .safari-packages-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.safari-load-error {
    border: 1px solid rgba(22, 163, 74, 0.18);
    border-radius: 0.5rem;
    background: #f0fdf4;
    padding: 2rem;
    text-align: center;
}

.safari-load-error p {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.safari-load-error a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .safari-teaser,
    .safari-teaser-img img,
    .package-card,
    .package-card img,
    .service-card,
    .fleet-item {
        transition: none;
    }

    .safari-teaser:hover,
    .package-card:hover,
    .service-card:hover,
    .fleet-item:hover {
        transform: none;
    }
}
