/**
 * attr-main.css - Stylesheet for Sri Lankan Attractions Master Page
 * Defines styles for the destinations listing page
 * Enhanced with premium elements and dark theme compatibility
 * 
 * Zenic Eco Trails - Attractions Module
 */

/* =============================================
 * HERO SLIDESHOW INTEGRATION
 * ============================================= */

/* Override hero slideshow for destinations page */
.hero-slideshow[data-hero-type="destinations"] {
    min-height: 70vh;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.hero-slideshow[data-hero-type="destinations"] h1 {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #f8b400 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
}

.hero-slideshow[data-hero-type="destinations"] .hero-badges .badge {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.hero-slideshow[data-hero-type="destinations"] .hero-badges .badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Category Filter Section - Dark Theme */
.attr-filter {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.filter-btn {
    transition: all 0.4s ease;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 25px;
    padding: 0.7rem 1.5rem;
    border-width: 2px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(33, 147, 176, 0.3);
    backdrop-filter: blur(10px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(33, 147, 176, 0.4);
    transform: translateY(-2px);
}

.filter-btn:hover:not(.active) {
    transform: translateY(-2px);
    background: rgba(33, 147, 176, 0.15);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(33, 147, 176, 0.2);
}

/* =============================================
 * DESTINATIONS SECTION - DARK THEME
 * ============================================= */

.attr-destinations {
    background: linear-gradient(135deg, #121212 0%, #1e1e1e 100%);
    position: relative;
    overflow: hidden;
}

/* Section Headers with White Text */
.attr-destinations .section-title {
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    font-size: 2.5rem;
    letter-spacing: 0.5px;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.attr-destinations .section-title:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-gold));
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(33, 147, 176, 0.3);
}

.attr-destinations .section-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: #ffffff !important;
    margin-top: 25px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Premium Glow Effects */
.premium-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(33, 147, 176, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    top: -100px;
    right: 10%;
    border-radius: 50%;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

.premium-glow-2 {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(248, 180, 0, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    bottom: -120px;
    left: 5%;
    border-radius: 50%;
    z-index: 1;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* =============================================
 * DESTINATION CARDS - ENHANCED DARK THEME
 * ============================================= */

.attr-card {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: none;
    opacity: 0;
    transform: translateY(30px);
    height: 100%;
    cursor: pointer;
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
    position: relative;
    backdrop-filter: blur(10px);
}

.attr-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(33, 147, 176, 0.1) 0%, rgba(248, 180, 0, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

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

.attr-card-animated {
    animation: fadeInUp 0.8s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.attr-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.attr-card-img-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.attr-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 1.2s ease;
    filter: brightness(0.9);
}

.attr-card:hover .attr-card-img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.attr-card-category {
    display: inline-block;
    color: white;
    padding: 8px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 25px;
    position: absolute;
    top: 15px;
    left: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 2;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.attr-card:hover .attr-card-category {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.attr-card .card-body {
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.attr-card .card-title {
    font-weight: 700;
    margin: 15px 0;
    color: #ffffff;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.attr-card:hover .card-title {
    color: var(--accent-gold);
    transform: scale(1.02);
}

.attr-card .card-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
    font-weight: 400;
}

.attr-card .btn-primary {
    transition: all 0.4s ease;
    border-width: 2px;
    font-weight: 600;
    padding: 0.7rem 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    letter-spacing: 0.5px;
    border-radius: 25px;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(33, 147, 176, 0.3);
}

.attr-card .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(33, 147, 176, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-gold));
    border-color: var(--accent-gold);
}

/* =============================================
 * LOADING & ERROR STATES
 * ============================================= */

#loading-overlay {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

#loading-overlay .spinner-border {
    width: 3.5rem;
    height: 3.5rem;
    border-width: 0.3rem;
    color: var(--accent-gold);
}

#loading-overlay p {
    font-size: 1.1rem;
    color: #ffffff !important;
    font-weight: 500;
    margin-top: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#error-message {
    padding: 60px 0;
}

#error-message i {
    color: var(--accent-gold);
}

#error-message h2,
#error-message p {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* =============================================
 * WHY VISIT SECTION - DARK THEME ENHANCEMENT
 * ============================================= */

.attr-why-visit {
    position: relative;
    overflow: hidden;
    /* Changed from light background to dark gradient */
    background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #21262d 100%);
    color: #ffffff;
    padding: 80px 0;
}

/* Dark theme section titles */
.attr-why-visit .section-title {
    color: #ffffff !important;
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    font-size: 2.5rem;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.attr-why-visit .section-title:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-gold));
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(33, 147, 176, 0.3);
}

.attr-why-visit .section-subtitle {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 25px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Enhanced dark theme cards with clear separation */
.attr-why-visit .card {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 20px;
    border: none;
    /* Dark card background with gradient */
    background: linear-gradient(145deg, #1c2128 0%, #2d333b 100%);
    /* Enhanced box shadow for better separation */
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 2;
    position: relative;
    overflow: hidden;
    /* Add border for better card separation */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Subtle glow effect on hover */
.attr-why-visit .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(33, 147, 176, 0.1) 0%, 
        rgba(248, 180, 0, 0.05) 50%,
        rgba(109, 213, 237, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px;
}

.attr-why-visit .card:hover::before {
    opacity: 1;
}

/* Enhanced hover effect */
.attr-why-visit .card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 10px 25px rgba(33, 147, 176, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(33, 147, 176, 0.3);
}

/* Icon styling */
.attr-why-visit .card i {
    transition: all 0.5s ease;
    color: var(--accent-gold);
    filter: drop-shadow(0 4px 8px rgba(248, 180, 0, 0.3));
}

.attr-why-visit .card:hover i {
    transform: scale(1.2) rotateY(180deg);
    color: var(--primary-color);
    filter: drop-shadow(0 6px 12px rgba(33, 147, 176, 0.4));
}

/* Card title - white text */
.attr-why-visit .card-title {
    font-weight: 700;
    color: #ffffff !important;
    transition: color 0.5s ease;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.attr-why-visit .card:hover .card-title {
    color: var(--accent-gold) !important;
    text-shadow: 0 0 10px rgba(248, 180, 0, 0.3);
}

/* Card text - light gray for readability */
.attr-why-visit .card-text {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.attr-why-visit .card:hover .card-text {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Card body padding */
.attr-why-visit .card-body {
    padding: 2.5rem 2rem;
    background: transparent;
}

/* Premium glow effects for this section */
.attr-why-visit::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(33, 147, 176, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    top: -150px;
    right: -100px;
    border-radius: 50%;
    z-index: 1;
    animation: float 8s ease-in-out infinite;
}

.attr-why-visit::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(248, 180, 0, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: -120px;
    left: -80px;
    border-radius: 50%;
    z-index: 1;
    animation: float 10s ease-in-out infinite reverse;
}

/* Floating animation */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-30px) rotate(180deg); 
        opacity: 0.8;
    }
}

/* =============================================
 * RESPONSIVE ENHANCEMENTS
 * ============================================= */

@media (max-width: 991.98px) {
    .attr-why-visit .section-title {
        font-size: 2.2rem;
    }
    
    .attr-why-visit .card-body {
        padding: 2rem 1.5rem;
    }
    
    .attr-why-visit .card i {
        font-size: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    .attr-why-visit {
        padding: 60px 0;
    }
    
    .attr-why-visit .section-title {
        font-size: 1.9rem;
    }
    
    .attr-why-visit .card {
        margin-bottom: 2rem;
    }
    
    .attr-why-visit .card-body {
        padding: 1.8rem 1.2rem;
    }
    
    .attr-why-visit .card i {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }
    
    .attr-why-visit .card-title {
        font-size: 1.2rem;
    }
    
    .attr-why-visit .card:hover {
        transform: translateY(-10px) scale(1.01);
    }
}

@media (max-width: 575.98px) {
    .attr-why-visit {
        padding: 50px 0;
    }
    
    .attr-why-visit .section-title {
        font-size: 1.7rem;
    }
    
    .attr-why-visit .section-subtitle {
        font-size: 1rem;
    }
    
    .attr-why-visit .card-body {
        padding: 1.5rem 1rem;
    }
    
    .attr-why-visit .card i {
        font-size: 2rem;
        margin-bottom: 1.2rem;
    }
    
    .attr-why-visit .card-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .attr-why-visit .card-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* =============================================
 * ACCESSIBILITY ENHANCEMENTS
 * ============================================= */

/* High contrast mode */
@media (prefers-contrast: high) {
    .attr-why-visit .card {
        border: 2px solid #ffffff;
        background: #000000;
    }
    
    .attr-why-visit .card-title {
        color: #ffffff !important;
        text-shadow: none;
    }
    
    .attr-why-visit .card-text {
        color: #ffffff !important;
        text-shadow: none;
    }
    
    .attr-why-visit .card i {
        color: #ffffff !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .attr-why-visit .card,
    .attr-why-visit .card i,
    .attr-why-visit::before,
    .attr-why-visit::after {
        animation: none;
        transition: none;
    }
}

/* Focus styles for keyboard navigation */
.attr-why-visit .card:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

/* =============================================
 * ANIMATION DELAYS FOR CARDS
 * ============================================= */

.attr-card:nth-child(1) { animation-delay: 0.1s; }
.attr-card:nth-child(2) { animation-delay: 0.2s; }
.attr-card:nth-child(3) { animation-delay: 0.3s; }
.attr-card:nth-child(4) { animation-delay: 0.4s; }
.attr-card:nth-child(5) { animation-delay: 0.5s; }
.attr-card:nth-child(6) { animation-delay: 0.6s; }
.attr-card:nth-child(7) { animation-delay: 0.7s; }
.attr-card:nth-child(8) { animation-delay: 0.8s; }

/* Why Visit Animation Delays */
.attr-why-visit .card:nth-child(1) { animation-delay: 0.1s; }
.attr-why-visit .card:nth-child(2) { animation-delay: 0.3s; }
.attr-why-visit .card:nth-child(3) { animation-delay: 0.5s; }

/* =============================================
 * ACCESSIBILITY & PERFORMANCE
 * ============================================= */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .attr-card,
    .attr-why-visit .card,
    .filter-btn,
    .premium-glow,
    .premium-glow-2 {
        animation: none;
        transition: none;
    }
    
    .hero-slideshow[data-hero-type="destinations"] {
        background-attachment: scroll;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .attr-card {
        border: 2px solid #fff;
    }
    
    .attr-card .card-title {
        color: #fff !important;
    }
    
    .filter-btn {
        border-width: 3px;
    }
    
    .attr-destinations .section-title,
    .attr-destinations .section-subtitle {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }
}

/* Focus styles for keyboard navigation */
.filter-btn:focus,
.attr-card:focus,
.attr-card .btn-primary:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

/* =============================================
 * PRINT STYLES
 * ============================================= */

@media print {
    .hero-slideshow,
    .attr-filter,
    .premium-glow,
    .premium-glow-2 {
        display: none;
    }
    
    .attr-destinations {
        background: #fff !important;
        color: #000 !important;
    }
    
    .attr-destinations .section-title,
    .attr-destinations .section-subtitle {
        color: #000 !important;
        text-shadow: none;
    }
    
    .attr-card {
        background: #fff !important;
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .attr-card .card-title,
    .attr-card .card-text {
        color: #000 !important;
    }
}