/* TMJ Travels - Modern Redesign 2026 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    /* Color Palette - Ocean & Sand Theme */
    --primary: #0f3460;        /* Deep Navy Blue */
    --primary-light: #16213e;  
    --secondary: #e94560;      /* Accent Color (Soft Red/Pink) or use Orange #f97316 */
    --accent: #f97316;         /* Vibrant Orange for CTAs */
    --teal: #08d9d6;           /* Highlights */
    --light-bg: #f3f4f6;
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #6b7280;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
    --gradient-overlay: linear-gradient(to bottom, rgba(15, 52, 96, 0.8), rgba(26, 26, 46, 0.9));
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    background-color: var(--white);
    opacity: 1;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar Scroll Effect */
.navbar {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0);
}

.navbar.scrolled {
    background: rgba(15, 52, 96, 0.98) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.navbar.navbar-hidden {
    transform: translateY(-100%);
}

.navbar-nav .nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: #006bea;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 90vh; /* Full screen impact */
    min-height: 600px;
    background: url('../images/hero.avif') center/cover no-repeat fixed;
    color: var(--white);
    margin-top: -76px; /* Pull behind transparent navbar if needed */
}

.hero-section .overlay {
    position: absolute;
    inset: 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-title .highlight-text {
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255, 1);
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 400;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* Custom Buttons */
.btn-custom-primary {
    background-color: var(--accent);
    color: var(--white);
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 2px solid var(--accent);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-custom-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn-custom-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-custom-primary:hover {
    background-color: transparent;
    color: var(--accent);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

.btn-outline-light {
    border-radius: 50px;
    padding: 12px 35px;
    font-weight: 500;
    transition: all 0.4s ease;
}

.btn-outline-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

/* ========================================
   SMOOTH ANIMATIONS SYSTEM
   ======================================== */

/* Animation Classes */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards ease-out;
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards ease-out;
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.8s forwards ease-out;
}

.animate-slide-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.8s forwards ease-out;
}

.animate-scale {
    opacity: 0;
    transform: scale(0.8);
    animation: scaleUp 0.8s forwards ease-out;
}

.animate-rotate {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
    animation: rotateIn 0.8s forwards ease-out;
}

/* Scroll Animation Class */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Animation Variants */
.scroll-animate.fade-in {
    transform: none;
}

.scroll-animate.slide-left {
    transform: translateX(-50px);
}

.scroll-animate.slide-left.active {
    transform: translateX(0);
}

.scroll-animate.slide-right {
    transform: translateX(50px);
}

.scroll-animate.slide-right.active {
    transform: translateX(0);
}

.scroll-animate.zoom-in {
    transform: scale(0.8);
}

.scroll-animate.zoom-in.active {
    transform: scale(1);
}

.scroll-animate.rotate-in {
    transform: rotate(-10deg) scale(0.9);
}

.scroll-animate.rotate-in.active {
    transform: rotate(0) scale(1);
}

/* Delay Classes */
.delay-100 { animation-delay: 0.2s; }
.delay-200 { animation-delay: 0.4s; }
.delay-300 { animation-delay: 0.6s; }
.delay-400 { animation-delay: 0.8s; }
.delay-500 { animation-delay: 1s; }

/* Keyframe Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleUp {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 10px 40px rgba(249, 115, 22, 0.3);
}

/* Continuous Animations */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* --- General Sections --- */
.section-padding {
    padding: 20px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.letter-spacing-2 {
    letter-spacing: 2px;
}

/* --- About Section Images --- */
.image-stack {
    position: relative;
    padding: 20px;
}

.image-stack img {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-stack:hover .main-img {
    transform: scale(1.05) rotate(2deg);
}

.image-stack:hover .small-img {
    transform: translateX(10px) translateY(10px) scale(1.1);
}

.small-img {
    position: absolute;
    bottom: -30px;
    right: -20px;
    width: 250px;
    border: 5px solid var(--white);
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.icon-box-sm {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.icon-box-sm:hover {
    transform: scale(1.1) rotate(10deg);
}

.icon-box-lg {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.icon-box-lg:hover {
    transform: scale(1.15) rotate(5deg);
}

.bg-light-primary {
    background-color: rgba(15, 52, 96, 0.1);
}

/* --- Services Cards --- */
.bg-light-gradient {
    background: linear-gradient(to bottom, #ffffff, #f3f4f6);
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-bottom: 3px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    border-bottom-color: var(--accent);
}

.service-card .icon-wrapper {
    font-size: 3rem;
    margin-bottom: 25px;
    color: var(--primary);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.service-card:hover .icon-wrapper {
    transform: scale(1.2) rotate(360deg);
    color: var(--accent);
}

.service-card h4 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 15px;
    font-family: 'Outfit', sans-serif;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.read-more i {
    font-size: 0.8rem;
    margin-left: 5px;
    transition: margin 0.3s;
}

.read-more:hover {
    color: var(--accent);
}

.read-more:hover i {
    margin-left: 10px;
}

/* --- Parallax Section --- */
.parallax-section {
    background: url('../images/kandy-perahera-cover-1.jpg') center/cover fixed;
    position: relative;
}

.overlay-dark {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

.feature-box {
    padding: 30px;
    border-radius: 10px;
    background: #ffffff2b;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgb(0 0 0 / 92%);
}

.feature-box:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: var(--accent);
}

.opacity-75 {
    opacity: .85 !important;
}

/* --- CTA Section --- */
.cta-section {
    padding: 80px 0;
    background-color: var(--white);
}

.cta-box {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary) 0%, #16213e 100%);
    padding: 60px;
    border-radius: 20px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 52, 96, 0.3);
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

.cta-box .text-muted {
    color: rgba(255,255,255,0.8) !important;
}

.overlay-dark {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 11%);
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .image-stack {
        margin-bottom: 30px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: auto;
        padding: 150px 0 100px;
    }
    
    .image-stack {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .small-img {
        position: static;
        width: 90%; 
        margin-top: 20px;
        border-width: 3px;
        display: block;
    }

    .hero-title {
        font-size: 2.2rem;
    }
    
    .cta-box {
        padding: 40px 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* ========================================
   ADDITIONAL SMOOTH EFFECTS
   ======================================== */

/* Link Hover Effects */
a {
    transition: all 0.3s ease;
}

/* Card Entrance Animation */
.service-card,
.feature-box {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

/* Stagger animations for lists */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* Image Hover Zoom */
.img-fluid {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rounded-4:hover {
    transform: scale(1.05);
}

/* Form Focus Effects */
.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.25);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Alert Animations */
.alert {
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Text Gradient Effect */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Ripple Effect on Click */
.btn-custom-primary {
    position: relative;
    overflow: hidden;
}

.btn-custom-primary::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;
}

.btn-custom-primary:active::after {
    width: 300px;
    height: 300px;
}

/* Skeleton Loading (optional) */
.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;
    }
}

/* Smooth Reveal for Sections */
section {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

section:nth-child(1) { animation-delay: 0s; }
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }

/* Performance Optimization */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   SCROLL TO TOP BUTTON
   ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent), var(--teal));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 25px rgba(8, 217, 214, 0.5);
}

.scroll-to-top:active {
    transform: scale(0.95);
}