/* 
 * Custom Styles for Феєрія Подорожей
 * Travel Agency Website
 */

/* Root Variables */
:root {
    --primary-blue: #0A2463;
    --accent-orange: #FB8500;
    --accent-yellow: #FFB703;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --bg-light: #f9fafb;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-orange);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-yellow);
}

/* Header Styles */
header {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero-overlay {
    background: linear-gradient(135deg, rgba(10, 36, 99, 0.9) 0%, rgba(10, 36, 99, 0.7) 100%);
}

/* Tour Cards */
.tour-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.tour-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.tour-card img {
    transition: transform 0.5s ease;
}

.tour-card:hover img {
    transform: scale(1.05);
}

/* Country Cards */
.country-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.country-card:hover {
    transform: scale(1.03);
}

.country-card img {
    transition: transform 0.5s ease;
}

.country-card:hover img {
    transform: scale(1.1);
}

.country-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    transition: opacity 0.3s ease;
}

.country-card:hover::after {
    opacity: 0.9;
}

/* Buttons */
button, .btn {
    transition: all 0.3s ease;
    cursor: pointer;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active, .btn:active {
    transform: translateY(0);
}

/* Form Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(251, 133, 0, 0.1);
}

/* Loading Animation */
.loading-spinner {
    border: 4px solid rgba(251, 133, 0, 0.2);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Back to Top Button */
#back-to-top {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(251, 133, 0, 0.4);
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(251, 133, 0, 0.6);
}

/* Back Button for iFrame */
#iframe-back-button {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(10, 36, 99, 0.4);
    animation: slideInFromLeft 0.5s ease-out;
}

#iframe-back-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(10, 36, 99, 0.6);
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #iframe-back-button {
        bottom: 6rem;
        left: 1rem;
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* iFrame Container */
.iframe-container {
    position: relative;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.iframe-container iframe {
    display: block;
    border: none;
}

/* Feerie iFrame Container */
.feerie-iframe-container {
    position: relative;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.feerie-iframe-container .feerie {
    position: relative;
}

.feerie-iframe-container iframe {
    display: block;
    border: none;
}

/* Responsive iframe */
@media (max-width: 768px) {
    .iframe-container iframe {
        min-height: 600px !important;
    }
    
    .feerie-iframe-container {
        min-height: 600px !important;
        max-height: 800px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .feerie-iframe-container {
        min-height: 700px !important;
        max-height: 1000px !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Price Badge Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.price-badge {
    animation: pulse 2s infinite;
}

/* Hover Effects for Links */
a {
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Card Shadow Effects */
.shadow-custom {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 15px rgba(0, 0, 0, 0.1);
}

.shadow-custom-hover:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Reviews Section */
.review-card {
    position: relative;
    transition: transform 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
}

.review-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 60px;
    color: var(--accent-orange);
    opacity: 0.2;
    font-family: Georgia, serif;
}

/* Footer */
footer a {
    position: relative;
}

footer a::after {
    display: none;
}

/* Notification Badges */
.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.5px;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* Print Styles */
@media print {
    header, footer, #mobile-menu-btn, #back-to-top {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    .tour-card, .country-card {
        break-inside: avoid;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Can be implemented later if needed */
}

/* Custom Grid Layouts */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.grid-auto-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Spacing Utilities */
.section-spacing {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .section-spacing {
        padding: 3rem 0;
    }
}

/* Container */
.container-custom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent-orange), transparent);
    margin: 2rem 0;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: var(--text-dark);
    color: white;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tooltip:hover::before {
    opacity: 1;
}

/* Special Effects */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}
