/* AL JUDE Travel Agency - Egypt Landing Page Styles */

/* Custom Properties */
:root {
    --egyptian-gold: #D4AF37;
    --egyptian-blue: #1E40AF;
    --egyptian-orange: #F59E0B;
    --sand: #F5E6D3;
    --dark-gold: #B8941F;
    --light-gold: #F4E4BC;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navigation Styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

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

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

/* Hero Section with Slideshow */
.hero-section {
    position: relative;
    background-attachment: fixed;
}

.hero-slideshow .slide {
    opacity: 0;
    transition: opacity 2s ease-in-out;
    transform: scale(1.1);
    animation: kenBurns 15s ease-in-out infinite;
}

.hero-slideshow .slide.active {
    opacity: 1;
}

/* Ken Burns Effect for Photos */
@keyframes kenBurns {
    0% { 
        transform: scale(1.1) translateX(0px) rotate(0deg); 
    }
    25% { 
        transform: scale(1.15) translateX(-30px) rotate(0.5deg); 
    }
    50% { 
        transform: scale(1.2) translateY(-20px) rotate(0deg); 
    }
    75% { 
        transform: scale(1.15) translateX(30px) rotate(-0.5deg); 
    }
    100% { 
        transform: scale(1.1) translateX(0px) rotate(0deg); 
    }
}

/* Slideshow Transition Effects */
.hero-slideshow .slide {
    background-attachment: fixed;
    will-change: opacity, transform;
}

@media (max-width: 768px) {
    .hero-slideshow .slide {
        background-attachment: scroll;
    }
    
    @keyframes kenBurns {
        0% { transform: scale(1.1); }
        50% { transform: scale(1.2); }
        100% { transform: scale(1.1); }
    }
}

/* Slideshow Controls */
.slideshow-dot.active {
    background-color: var(--egyptian-gold) !important;
    transform: scale(1.2);
}

.slideshow-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.slideshow-dot:hover {
    transform: scale(1.1);
}

/* Logo Orange Color for Egypt Text */
.text-logo-orange {
    color: var(--egyptian-orange) !important;
}

/* Logo Orange Button Styles */
.bg-logo-orange {
    background-color: var(--egyptian-orange) !important;
}

.hover\:bg-logo-orange-dark:hover {
    background-color: #D97706 !important; /* Slightly darker orange for hover */
}

/* Destination Indicator Animation */
.destination-indicator {
    animation: slideInLeft 0.8s ease;
}

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

/* Animation Classes */
.hero-content {
    animation: fadeInUp 1s ease forwards;
}

.hero-btn {
    animation: slideInUp 1s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

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

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

/* Stats Animation */
.stat-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

/* Destination Cards */
.destination-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.destination-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(30, 64, 175, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none; /* This prevents the overlay from blocking clicks */
}

.destination-card:hover::before {
    opacity: 1;
}

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

.destination-card img {
    transition: transform 0.5s ease;
}

.destination-card:hover img {
    transform: scale(1.1);
}

/* Ensure buttons are clickable */
.destination-card .flex.gap-2 {
    position: relative;
    z-index: 10;
}

.destination-card button {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

/* Package Cards */
.package-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.package-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(30, 64, 175, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.package-card:hover::before {
    opacity: 1;
}

.package-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Modal Styles */
.modal {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Form Styles */
input, select, textarea {
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.1);
}

/* Button Hover Effects */
button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

button::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;
    pointer-events: none;
}

button:hover::before {
    left: 100%;
}

/* PDF Button Specific Styles */
button[onclick*="openPDF"] {
    font-weight: 600;
    letter-spacing: 0.025em;
}

button[onclick*="openPDF"]:hover {
    background-color: #F59E0B !important;
    transform: translateY(-2px) scale(1.02);
}

/* Gold Gradient Backgrounds */
.bg-egyptian-gold {
    background: linear-gradient(135deg, var(--egyptian-gold) 0%, var(--dark-gold) 100%);
}

.bg-egyptian-blue {
    background: linear-gradient(135deg, var(--egyptian-blue) 0%, #1e3a8a 100%);
}

/* Text Gradients */
.text-gradient-gold {
    background: linear-gradient(135deg, var(--egyptian-gold), var(--dark-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Scroll Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Spinner for PDF */
.pdf-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--egyptian-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Egyptian Pattern Background */
.pattern-bg {
    background-image: 
        radial-gradient(circle at 1px 1px, var(--egyptian-gold) 1px, transparent 0);
    background-size: 20px 20px;
    opacity: 0.05;
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    .parallax {
        background-attachment: scroll;
    }
    
    .destination-card:hover {
        transform: none;
    }
    
    .package-card:hover {
        transform: none;
    }
    
    .modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 1.1rem !important;
    }
    
    .hero-btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .destination-card {
        margin-bottom: 2rem;
    }
    
    .package-card {
        margin-bottom: 2rem;
    }
}

/* Print Styles */
@media print {
    .modal, nav, footer {
        display: none !important;
    }
    
    .hero-section {
        background: white;
        color: black;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --egyptian-gold: #B8860B;
        --egyptian-blue: #000080;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gold);
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 2px solid var(--egyptian-gold);
    outline-offset: 2px;
}

button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--egyptian-gold);
    outline-offset: 2px;
}

/* Loading States */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* Success and Error States */
.success-message {
    color: #059669;
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 12px;
    margin: 16px 0;
}

.error-message {
    color: #dc2626;
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 12px;
    margin: 16px 0;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* Image Overlay Effects */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.8) 0%,
        rgba(30, 64, 175, 0.8) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.destination-card:hover .image-overlay {
    opacity: 1;
}

/* Logo Styles */
.logo-container {
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

/* Hero Logo Enhancement */
.hero-logo {
    animation: logoFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.3));
}

@keyframes logoFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1);
    }
    50% { 
        transform: translateY(-8px) scale(1.02);
    }
}

/* Hero Content Spacing */
.hero-content {
    padding: 2rem 1rem;
}

@media (max-width: 768px) {
    .hero-logo {
        animation: none; /* Disable animation on mobile for better performance */
    }
    
    .hero-content {
        padding: 1rem 0.5rem;
    }
}

/* Bilingual & RTL Support */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .flex {
    flex-direction: row-reverse;
}

.rtl .space-x-3 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* Language Toggle */
.language-toggle {
    position: relative;
}

.lang-btn.active {
    background-color: var(--egyptian-gold);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Arabic Font Support */
.arabic {
    font-family: 'Cairo', 'Amiri', 'Noto Sans Arabic', sans-serif;
}

/* RTL Specific Styles */
.rtl .text-center {
    text-align: center;
}

.rtl .justify-center {
    justify-content: center;
}

.rtl .items-center {
    align-items: center;
}

/* Arabic Text Adjustments */
.rtl h1, .rtl h2, .rtl h3 {
    font-weight: 700;
}

.rtl .hero-btn {
    flex-direction: row-reverse;
}

.rtl .nav-link {
    text-align: right;
}

/* Smooth Transitions for Language Switch */
[data-en], [data-ar] {
    transition: opacity 0.3s ease;
}

/* Mobile RTL Support */
@media (max-width: 768px) {
    .rtl .flex-col {
        align-items: flex-end;
    }
    
    .rtl .text-center {
        text-align: center;
    }
}