/* CSS Variables with enhanced effects - Teal-Orange Color Scheme */
:root {
    --teal-primary: #008080;
    --teal-dark: #004d4d;
    --teal-light: #00cccc;
    --orange-primary: #ff7f50;
    --orange-dark: #e65c35;
    --orange-light: #ff9a75;
    --cream-bg: #fff8dc;
    --white: #ffffff;
    --gray-light: #f5f7fa;
    --gray-medium: #e2e8f0;
    --gray-dark: #2c3e50;
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.4s ease;
    --border-radius: 12px;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    font-size: 14px;
    /* Base font size for mobile */
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--gray-dark);
    background-color: var(--cream-bg);
    overflow-x: hidden;
    /* Smooth scrolling improvements */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    overscroll-behavior-y: none;
}

.container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 15px;
}

.tourism-container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles - Enhanced with Business.css styling */
.page-header {
    margin-bottom: 0;
    height: 60vh;
    /* Reduced for mobile */
    min-height: 300px;
    /* Reduced for mobile */
    background-image: linear-gradient(90deg, rgba(22, 48, 5, 0.7) 0%, rgba(196, 110, 57, 0.7) 100%), url('tourism_assets/kunduvada.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    animation: headerZoom 20s ease-in-out infinite;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('tourism_assets/kunduvada.jpg') center/cover no-repeat;
    opacity: 0.1;
    z-index: 1;
}

.header-content {
    max-width: 800px;
    z-index: 2;
    padding: 20px 15px;
    /* Reduced padding for mobile */
    position: relative;
}

.page-header h1 {
    font-size: 2rem;
    /* Reduced for mobile */
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    animation: fadeInDown 1.2s ease;
    line-height: 1.3;
    /* Better line height for mobile */
}

.page-header p {
    font-size: 1rem;
    /* Reduced for mobile */
    margin-bottom: 1rem;
    font-weight: 300;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    line-height: 1.5;
    /* Better line height for mobile */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1.2s ease;
}

.scroll-indicator {
    position: relative;
    bottom: 15px;
    /* Adjusted for mobile */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--white);
    opacity: 0.9;
    animation: bounce 2s infinite;
}

.arrow {
    width: 18px;
    /* Slightly smaller for mobile */
    height: 18px;
    border-right: 3px solid var(--white);
    border-bottom: 3px solid var(--white);
    transform: rotate(45deg);
    margin: 6px auto 0;
    /* Reduced margin */
}

/* Main Content */
.main-content {
    background-color: var(--cream-bg);
    padding: 1.5rem 0;
    /* Reduced padding for mobile */
    /* Improved scrolling performance */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
}

.section-title {
    font-size: 1.8rem;
    /* Reduced for mobile */
    color: var(--teal-dark);
    text-align: center;
    margin-bottom: 1.5rem;
    /* Reduced margin for mobile */
    position: relative;
    padding: 0 15px;
    font-weight: 700;
    line-height: 1.3;
    /* Better line height */
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    /* Adjusted position */
    transform: translateX(-50%);
    width: 60px;
    /* Slightly smaller */
    height: 3px;
    /* Thinner */
    border-radius: 2px;
    background: linear-gradient(to right, var(--teal-primary), var(--orange-primary));
}

/* Religious Places Section - Enhanced */
.religious-section {
    margin-bottom: 0px;
    background: var(--cream-bg);
    padding: 2rem 0;
    /* Reduced padding for mobile */
    border-radius: 15px;
    transform: translateZ(0);
}

.religious-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column for mobile */
    gap: 1.5rem;
    margin-bottom: 0px;
    padding: 0 15px;
}

.religious-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0 5px;
    backface-visibility: hidden;
    transform: translateZ(0);
    height: 100%;
    min-height: 300px;
    /* Ensure minimum height for touch */
}

.religious-card:hover {
    transform: translateY(-5px);
    /* Reduced hover effect for mobile */
    box-shadow: var(--shadow);
}

.religious-image {
    position: relative;
    overflow: hidden;
    height: 180px;
    /* Reduced height for mobile */
}

.religious-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    image-rendering: -webkit-optimize-contrast;
}

.religious-card:hover .religious-image img {
    transform: scale(1.1);
}

.religious-content {
    padding: 1.25rem;
    /* Slightly reduced padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.religious-content h4 {
    font-size: 1.2rem;
    /* Slightly smaller for mobile */
    color: var(--teal-dark);
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    /* Better line height */
}

.religious-content p {
    color: var(--gray-dark);
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1;
    font-size: 0.95rem;
}

.religious-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-top: auto;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    gap: 0.5rem;
    /* Add gap for wrapped items */
}

.location {
    color: var(--teal-primary);
    font-weight: 500;
}

.rating {
    color: var(--orange-primary);
    font-weight: 600;
}

/* Mosque and Churches Section - Enhanced */
.temples-grid {
    background-color: var(--cream-bg);
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    /* Reduced gap for mobile */
    margin-bottom: 0px;
    padding: 0 15px;
    transform: translateZ(0);
}

.temple-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 2px solid rgba(255, 140, 0, 0.2);
    display: flex;
    flex-direction: column;
    min-height: auto;
    position: relative;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.temple-card * {
    box-sizing: border-box;
}

.temple-card:hover {
    transform: translateY(-5px);
    /* Reduced hover effect */
    box-shadow: var(--shadow);
    border-color: rgba(255, 140, 0, 0.4);
}

/* Fixed image container */
.card-image {
    width: 100%;
    min-height: 220px;
    /* Reduced height for mobile */
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.temple-card {
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.temple-card:hover {
    transform: translateY(-5px);
    /* Reduced hover effect */
    box-shadow: var(--shadow);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    image-rendering: -webkit-optimize-contrast;
}

.temple-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.25rem;
    /* Slightly reduced padding */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content h3 {
    color: var(--teal-primary);
    font-size: 1.2rem;
    /* Slightly larger for better readability */
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
    /* Better line height */
}

.card-content p {
    color: var(--gray-dark);
    margin-bottom: 1.2rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    gap: 0.5rem;
    /* Add gap for wrapped items */
}

.location {
    color: var(--teal-primary);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating {
    color: var(--orange-primary);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.map-container {
    margin-top: 1.2rem;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 140, 0, 0.3);
    height: 140px;
    /* Slightly reduced height */
    transition: var(--transition);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.temple-details {
    background: rgba(0, 139, 139, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1.2rem;
    margin-top: 1.2rem;
    border: 1px solid rgba(0, 139, 139, 0.3);
}

.detail-item {
    display: flex;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: var(--teal-primary);
    margin-right: 10px;
    font-weight: 600;
    min-width: 80px;
    /* Ensure minimum width for labels */
}

.detail-value {
    color: var(--gray-dark);
    font-weight: 600;
    flex: 1;
    /* Allow value to take remaining space */
}

/* Parks & Gardens Section - Enhanced */
/* Parks & Gardens Section - Enhanced */
.parks-section {
    max-width: 100%;
    margin-bottom: 0px;
    background: var(--cream-bg);
    padding: 2.5rem 0;
    border-radius: 15px;
    transform: translateZ(0);
}

.parks-container {
    max-width: 1400px;
    /* Reduced for better alignment */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Fixed 4 columns */
    gap: 1.5rem;
    /* Consistent gap */
    justify-content: center;
    align-items: stretch;
    /* Ensure equal height */
    margin: 0 auto;
    /* Center the container */
    padding: 0 1rem;
    /* Add padding for spacing */
}

.park-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    backface-visibility: hidden;
    transform: translateZ(0);
    height: 100%;
    /* Full height */
    display: flex;
    flex-direction: column;
    margin: 0;
    /* Remove individual margins */
}

.park-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.park-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    /* Prevent image from shrinking */
}

.park-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    image-rendering: -webkit-optimize-contrast;
}

.park-card:hover .park-image img {
    transform: scale(1.1);
}

.park-content {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    /* Take remaining space */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Distribute content evenly */
}

.park-content h4 {
    font-size: 1.1rem;
    /* Slightly larger for better readability */
    color: var(--teal-dark);
    margin-bottom: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
}

.park-content p {
    color: var(--gray-dark);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    flex-grow: 1;
    line-height: 1.5;
}

.park-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: auto;
    /* Push to bottom */
}

.park-feature {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--gray-dark);
}

/* Responsive Design for 4-column layout */
@media (max-width: 1200px) {
    .parks-container {
        grid-template-columns: repeat(3, 1fr);
        /* 3 columns on medium screens */
        max-width: 1200px;
    }
}

@media (max-width: 900px) {
    .parks-container {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablets */
        max-width: 900px;
        gap: 1.25rem;
    }

    .park-content {
        padding: 1.25rem;
    }
}

@media (max-width: 600px) {
    .parks-container {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
        max-width: 500px;
        gap: 1rem;
        padding: 0 1rem;
    }

    .park-card {
        max-width: 400px;
        /* Limit card width on mobile */
        margin: 0 auto;
        /* Center cards on mobile */
    }

    .park-content {
        padding: 1rem;
    }

    .park-content h4 {
        font-size: 1rem;
    }
}

/* For very large screens */
@media (min-width: 1600px) {
    .parks-container {
        max-width: 1500px;
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .park-card {
        max-width: 350px;
        /* Limit maximum card width */
    }
}

/* Ensure equal height for all cards */
.parks-container {
    align-items: stretch;
}

.park-card {
    min-height: 400px;
    /* Set minimum height for consistency */
}

/* Optional: Add subtle border for better visual separation */
.park-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.park-card:hover {
    border-color: rgba(0, 128, 128, 0.2);
}

/* Natural Attractions Section */
.natural-section {
    margin-left: 20px;
    margin-right: 20px;
    margin-top: 0px;
    margin-bottom: 0px;
    background: #fff8dc;
    padding: 3rem 0;
    border-radius: 15px;
}

.natural-showcase {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(4, 100px);
    gap: 1rem;
}

.natural-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.natural-item:hover {
    transform: scale(1.02);
    box-shadow: var(--card-shadow-hover);
    z-index: 2;
}

.natural-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.natural-item:hover img {
    transform: scale(1.05);
}

.natural-item-large {
    grid-column: span 6;
    grid-row: span 2;
}

.natural-item-medium {
    grid-column: span 4;
    grid-row: span 2;
}

.natural-item-small {
    grid-column: span 4;
    grid-row: span 2;
}

.natural-item-smal {
    grid-column: span 2;
    grid-row: span 2;
}

.natural-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.natural-item:hover .natural-caption {
    transform: translateY(0);
}

/* Mobile Responsive Styles */
@media (max-width: 1200px) {
    .natural-showcase {
        grid-template-columns: repeat(8, 1fr);
        grid-template-rows: repeat(6, 100px);
        gap: 0.8rem;
    }

    .natural-item-large {
        grid-column: span 4;
    }

    .natural-item-medium {
        grid-column: span 4;
    }

    .natural-item-small {
        grid-column: span 4;
    }

    .natural-item-smal {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .natural-section {
        margin-left: 15px;
        margin-right: 15px;
        padding: 2rem 0;
        border-radius: 10px;
    }

    .natural-showcase {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: auto;
        gap: 0.8rem;
        display: flex;
        flex-direction: column;
    }

    .natural-item {
        width: 100%;
        height: 300px;
        margin-bottom: 1rem;
    }

    .natural-item-large,
    .natural-item-medium,
    .natural-item-small,
    .natural-item-smal {
        grid-column: 1 / -1;
        grid-row: auto;
        height: 300px;
    }

    .natural-caption {
        transform: translateY(0);
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
        padding: 1.5rem 1rem 1rem;
    }

    .natural-item:hover {
        transform: none;
        box-shadow: var(--card-shadow);
    }

    .natural-item:hover img {
        transform: none;
    }
}

@media (max-width: 480px) {
    .natural-section {
        margin-left: 10px;
        margin-right: 10px;
        padding: 1.5rem 0;
        border-radius: 8px;
    }

    .natural-item {
        height: 250px;
        margin-bottom: 0.8rem;
        border-radius: 8px;
    }

    .natural-item-large,
    .natural-item-medium,
    .natural-item-small,
    .natural-item-smal {
        height: 250px;
    }

    .natural-caption {
        padding: 1rem 0.8rem 0.8rem;
    }

    .natural-caption h4 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }

    .natural-caption p {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .natural-showcase {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(8, 80px);
        gap: 0.8rem;
    }

    .natural-item-large {
        grid-column: span 3;
        grid-row: span 2;
    }

    .natural-item-medium {
        grid-column: span 3;
        grid-row: span 2;
    }

    .natural-item-small {
        grid-column: span 3;
        grid-row: span 2;
    }

    .natural-item-smal {
        grid-column: span 2;
        grid-row: span 2;
    }
}

/* Small Mobile Devices */
@media (max-width: 360px) {
    .natural-section {
        margin-left: 5px;
        margin-right: 5px;
        padding: 1rem 0;
    }

    .natural-item {
        height: 200px;
        margin-bottom: 0.6rem;
    }

    .natural-item-large,
    .natural-item-medium,
    .natural-item-small,
    .natural-item-smal {
        height: 200px;
    }

    .natural-caption {
        padding: 0.8rem 0.6rem 0.6rem;
    }

    .natural-caption h4 {
        font-size: 1rem;
    }

    .natural-caption p {
        font-size: 0.8rem;
    }
}

/* Fix for natural-item-smal typo (in case it's intentional) */
.natural-item-smal {
    grid-column: span 2;
    grid-row: span 2;
}

/* Touch device improvements */
@media (hover: none) {
    .natural-item:hover {
        transform: none;
    }

    .natural-item:hover img {
        transform: none;
    }

    .natural-caption {
        transform: translateY(0);
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    }
}

/* High-resolution displays */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    .natural-showcase {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: auto;
        display: flex;
        flex-direction: column;
    }

    .natural-item {
        width: 100%;
        height: 280px;
        margin-bottom: 1rem;
    }

    .natural-item-large,
    .natural-item-medium,
    .natural-item-small,
    .natural-item-smal {
        grid-column: 1 / -1;
        grid-row: auto;
        height: 280px;
    }
}

/* Tourist Information Section - Enhanced */
.tourist-info-compact {
    background-color: var(--cream-bg);
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 15px;
    /* Reduced padding for mobile */
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.compact-title {
    text-align: center;
    font-size: 1.8rem;
    /* Reduced for mobile */
    margin-bottom: 1.5rem;
    /* Reduced margin for mobile */
    color: var(--teal-dark);
    padding: 0 15px;
    font-weight: 700;
    line-height: 1.3;
    /* Better line height */
}

.compact-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    /* Adjusted position */
    transform: translateX(-50%);
    width: 50px;
    /* Smaller width */
    height: 3px;
    /* Thinner */
    background: linear-gradient(to right, var(--teal-primary), var(--orange-primary));
    border-radius: 2px;
}

.compact-grid {
    display: grid;
    align-items: center;
    grid-template-columns: 1fr;
    /* Single column for mobile */
    gap: 1.5rem;
    border-radius: 18px;
    padding: 0 15px;
}

.compact-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 1.25rem;
    /* Slightly reduced padding */
    transition: var(--transition);
    backface-visibility: hidden;
    transform: translateZ(0);
    height: 100%;
    min-height: 200px;
    /* Ensure minimum height for touch */
}

.compact-card:hover {
    transform: translateY(-5px);
    /* Reduced hover effect */
    box-shadow: var(--shadow);
}

.compact-icon {
    text-align: center;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.compact-card:hover .compact-icon {
    transform: scale(1.1);
}

.compact-icon i {
    font-size: 22px;
    /* Slightly smaller for mobile */
    color: var(--white);
    background: var(--teal-primary);
    padding: 10px;
    /* Slightly reduced padding */
    border-radius: 50%;
    width: 45px;
    /* Slightly smaller */
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.compact-card:nth-child(2) .compact-icon i {
    background: var(--teal-light);
}

.compact-card:nth-child(3) .compact-icon i {
    background: var(--orange-primary);
}

.compact-card:nth-child(4) .compact-icon i {
    background: var(--orange-dark);
}

.compact-card h3 {
    font-size: 1.1rem;
    /* Slightly smaller for mobile */
    margin-bottom: 1rem;
    color: var(--teal-dark);
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
    /* Better line height */
}

.compact-card ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.compact-card ul li {
    padding: 0.5rem 0;
    /* Slightly reduced padding */
    font-size: 0.9rem;
    color: var(--gray-dark);
    border-bottom: 1px dashed var(--gray-medium);
    display: flex;
    align-items: flex-start;
    /* Better alignment for wrapped content */
    line-height: 1.4;
}

.compact-card ul li:before {
    content: '•';
    color: var(--teal-primary);
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
    /* Prevent bullet from shrinking */
    margin-top: 0.1rem;
    /* Better vertical alignment */
}

.compact-card ul li:last-child {
    border-bottom: none;
}

/* Section Footer */
.section-explore {
    text-align: center;
    margin-top: 1.5rem;
    /* Reduced margin for mobile */
    padding: 0 15px;
}

/* Explore More Button - Enhanced */
.explore-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--teal-primary), var(--orange-primary));
    color: var(--white);
    padding: 0.9rem 1.8rem;
    /* Slightly larger for better touch */
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-light);
    min-height: 50px;
    /* Minimum touch target */
    min-width: 140px;
    /* Minimum touch target */
    text-align: center;
    line-height: 1.2;
    /* Better vertical alignment */
}

.explore-btn:hover {
    background: linear-gradient(135deg, var(--teal-dark), var(--orange-dark));
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Custom Link */
.custom-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;
    /* Minimum touch target */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.custom-link:hover {
    color: var(--teal-primary);
    transform: translateY(-2px);
}

/* Kannada Font Support */
body.kannada {
    font-family: 'Noto Sans Kannada', 'Poppins', sans-serif;
}

/* Language content styling */
.en {
    display: block;
}

.kn {
    display: none;
    font-family: 'Noto Sans Kannada', sans-serif;
}

/* When body has kannada class, show Kannada content */
body.kannada .en {
    display: none;
}

body.kannada .kn {
    display: block;
}

/* ========== TEMPLES PAGE HEADER STYLES ========== */
.header {
    text-align: center;
    padding: 2rem 1rem;
    /* Reduced padding for mobile */
    background: linear-gradient(135deg, var(--teal-dark) 0%, var(--orange-dark) 100%);
    color: white;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.header h1 {
    font-size: 2rem;
    /* Reduced for mobile */
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    line-height: 1.3;
    /* Better line height */
}

.header p {
    font-size: 1rem;
    /* Reduced for mobile */
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
    position: relative;
    line-height: 1.5;
    /* Better line height */
}

.category-header {
    text-align: center;
    margin-bottom: 2rem;
    /* Reduced margin for mobile */
    position: relative;
    padding: 0 15px;
}

.category-title {
    font-size: 1.8rem;
    /* Reduced for mobile */
    color: var(--teal-dark);
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    line-height: 1.3;
    /* Better line height */
}

.category-title::after {
    content: '';
    position: absolute;
    width: 60px;
    /* Smaller width for mobile */
    height: 3px;
    /* Thinner */
    background: linear-gradient(90deg, var(--teal-primary), var(--orange-primary));
    bottom: -10px;
    /* Adjusted position */
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.category-description {
    font-size: 1rem;
    /* Reduced for mobile */
    color: var(--gray-dark);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Navigation Styles - Responsive with Wrapping */
.temple-nav,
.church-nav,
.park-nav,
.natural-nav {
    background: linear-gradient(135deg, var(--teal-dark) 0%, var(--orange-dark) 100%);
    padding: 0.8rem 0;
    align-items: center;
    position: relative;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-light);
    /* Horizontal scrolling for desktop */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Custom scrollbar for webkit browsers */
.temple-nav::-webkit-scrollbar,
.church-nav::-webkit-scrollbar,
.park-nav::-webkit-scrollbar,
.natural-nav::-webkit-scrollbar {
    height: 6px;
}

.temple-nav::-webkit-scrollbar-track,
.church-nav::-webkit-scrollbar-track,
.park-nav::-webkit-scrollbar-track,
.natural-nav::-webkit-scrollbar-track {
    background: transparent;
}

.temple-nav::-webkit-scrollbar-thumb,
.church-nav::-webkit-scrollbar-thumb,
.park-nav::-webkit-scrollbar-thumb,
.natural-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.temple-nav .nav-wrapper,
.church-nav .nav-wrapper,
.park-nav .nav-wrapper,
.natural-nav .nav-wrapper {
    display: flex;
    padding: 0 1rem;
    scroll-behavior: smooth;
}

.temple-nav ul,
.church-nav ul,
.park-nav ul,
.natural-nav ul {
    display: flex;
    justify-content: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    min-width: max-content;
    flex-wrap: nowrap; /* Default: no wrapping */
}

.temple-nav li,
.church-nav li,
.park-nav li,
.natural-nav li {
    margin: 0;
    flex-shrink: 0;
}

.temple-nav a,
.church-nav a,
.park-nav a,
.natural-nav a {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    min-height: 44px;
    min-width: 44px;
    flex-shrink: 0;
}

.temple-nav a:hover,
.church-nav a:hover,
.park-nav a:hover,
.natural-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Active state */
.temple-nav a.active,
.church-nav a.active,
.park-nav a.active,
.natural-nav a.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
}

/* Tablet - Start wrapping on medium screens */
@media (max-width: 1024px) {
    .temple-nav,
    .church-nav,
    .park-nav,
    .natural-nav {
        overflow-x: visible; /* Allow wrapping */
        overflow-y: visible;
        padding: 0.7rem 0;
    }
    
    .temple-nav ul,
    .church-nav ul,
    .park-nav ul,
    .natural-nav ul {
        flex-wrap: wrap; /* Enable wrapping */
        justify-content: center;
        min-width: auto;
        gap: 0.6rem;
    }
    
    .temple-nav .nav-wrapper,
    .church-nav .nav-wrapper,
    .park-nav .nav-wrapper,
    .natural-nav .nav-wrapper {
        padding: 0 1rem;
        justify-content: center;
    }
    
    .temple-nav a,
    .church-nav a,
    .park-nav a,
    .natural-nav a {
        padding: 0.7rem 1.1rem;
        font-size: 0.88rem;
    }
}

/* Mobile - More wrapping */
@media (max-width: 768px) {
    .temple-nav,
    .church-nav,
    .park-nav,
    .natural-nav {
        padding: 0.6rem 0;
        overflow-x: visible;
    }
    
    .temple-nav ul,
    .church-nav ul,
    .park-nav ul,
    .natural-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .temple-nav .nav-wrapper,
    .church-nav .nav-wrapper,
    .park-nav .nav-wrapper,
    .natural-nav .nav-wrapper {
        padding: 0 0.8rem;
    }
    
    .temple-nav a,
    .church-nav a,
    .park-nav a,
    .natural-nav a {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
        min-height: 42px;
        min-width: auto; /* Allow flexible width */
        flex: 0 1 auto; /* Flexible sizing */
    }
    
    /* Make sure items don't get too small */
    .temple-nav li,
    .church-nav li,
    .park-nav li,
    .natural-nav li {
        flex-shrink: 1;
        flex-grow: 0;
    }
}

/* Small Mobile - Compact wrapping */
@media (max-width: 480px) {
    .temple-nav,
    .church-nav,
    .park-nav,
    .natural-nav {
        padding: 0.5rem 0;
    }
    
    .temple-nav ul,
    .church-nav ul,
    .park-nav ul,
    .natural-nav ul {
        gap: 0.4rem;
        justify-content: center;
    }
    
    .temple-nav .nav-wrapper,
    .church-nav .nav-wrapper,
    .park-nav .nav-wrapper,
    .natural-nav .nav-wrapper {
        padding: 0 0.5rem;
    }
    
    .temple-nav a,
    .church-nav a,
    .park-nav a,
    .natural-nav a {
        padding: 0.6rem 0.9rem;
        font-size: 0.82rem;
        min-height: 40px;
        border-radius: 20px;
    }
}

/* Extra Small Mobile - Very compact */
@media (max-width: 360px) {
    .temple-nav ul,
    .church-nav ul,
    .park-nav ul,
    .natural-nav ul {
        gap: 0.3rem;
    }
    
    .temple-nav a,
    .church-nav a,
    .park-nav a,
    .natural-nav a {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-height: 38px;
        border-radius: 18px;
    }
    
    .temple-nav .nav-wrapper,
    .church-nav .nav-wrapper,
    .park-nav .nav-wrapper,
    .natural-nav .nav-wrapper {
        padding: 0 0.3rem;
    }
}

/* Desktop - Single row with horizontal scroll */
@media (min-width: 1025px) {
    .temple-nav,
    .church-nav,
    .park-nav,
    .natural-nav {
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .temple-nav ul,
    .church-nav ul,
    .park-nav ul,
    .natural-nav ul {
        flex-wrap: nowrap;
        justify-content: flex-start;
        min-width: max-content;
    }
    
    .temple-nav a,
    .church-nav a,
    .park-nav a,
    .natural-nav a {
        min-width: 44px; /* Fixed minimum width for desktop */
    }
}

/* Hide scrollbar when not needed on very wide screens */
@media (min-width: 1400px) {
    .temple-nav,
    .church-nav,
    .park-nav,
    .natural-nav {
        overflow-x: hidden;
    }
    
    .temple-nav ul,
    .church-nav ul,
    .park-nav ul,
    .natural-nav ul {
        justify-content: center;
    }
}

/* Touch device improvements */
@media (hover: none) {
    .temple-nav a:hover,
    .church-nav a:hover,
    .park-nav a:hover,
    .natural-nav a:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.15);
    }
}

/* Container Styles */
.church-container,
.parks-container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Hide scrollbars for nav */
.temple-nav .nav-wrapper::-webkit-scrollbar,
.church-nav .nav-wrapper::-webkit-scrollbar,
.park-nav .nav-wrapper::-webkit-scrollbar,
.natural-nav .nav-wrapper::-webkit-scrollbar {
    display: none;
}

.temple-nav .nav-wrapper,
.church-nav .nav-wrapper,
.park-nav .nav-wrapper,
.natural-nav .nav-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== ENHANCED MOBILE RESPONSIVE DESIGN ===== */

/* Extra Small Devices (Phones, 320px and up) */
@media (min-width: 320px) {
    html {
        font-size: 14px;
    }
}

/* Small Devices (Phones, 375px and up) */
@media (min-width: 375px) {
    html {
        font-size: 15px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .page-header p {
        font-size: 1.1rem;
    }
}

/* Medium Phones (425px and up) */
@media (min-width: 425px) {

    .religious-grid,
    .parks-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .compact-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Small Phones (up to 480px) - Enhanced */
@media (max-width: 480px) {

    .container,
    .tourism-container {
        padding: 0 12px;
        /* Slightly more padding */
    }

    .page-header {
        height: 55vh;
        min-height: 280px;
    }

    .page-header h1 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .page-header p {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .header-content {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .religious-grid,
    .temples-grid,
    .parks-container,
    .compact-grid {
        padding: 0 10px;
        gap: 1.2rem;
    }

    .religious-card,
    .temple-card,
    .park-card {
        margin: 0 2px;
    }

    .card-content,
    .religious-content,
    .park-content {
        padding: 1.2rem;
    }

    .map-container {
        height: 130px;
    }

    .temple-details {
        padding: 1rem;
    }

    .compact-card {
        padding: 1.2rem;
    }

    .explore-btn {
        padding: 0.8rem 1.6rem;
        font-size: 0.95rem;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .header p {
        font-size: 0.95rem;
    }

    .category-title {
        font-size: 1.6rem;
    }

    .category-description {
        font-size: 0.95rem;
    }

    .temple-nav a,
    .church-nav a,
    .park-nav a,
    .natural-nav a {
        padding: 0.7rem 1.1rem;
        font-size: 0.85rem;
    }
}

/* Tablet and larger phones (768px and up) */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    .container {
        padding: 0 20px;
    }

    .page-header {
        height: 70vh;
        min-height: 400px;
    }

    .page-header h1 {
        font-size: 2.8rem;
    }

    .page-header p {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 2.3rem;
    }

    .religious-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
        padding: 0 20px;
    }

    .temples-grid {
        gap: 2.5rem;
        padding: 0 20px;
    }

    .temple-card {
        flex-direction: row;
        min-height: 280px;
    }

    .card-image {
        width: 40%;
        min-height: 280px;
    }

    .parks-container {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }

    .natural-showcase {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 180px);
    }

    .natural-item-large {
        grid-column: span 2;
    }

    .compact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .header p {
        font-size: 1.2rem;
    }

    .category-title {
        font-size: 2.2rem;
    }

    .temple-nav a,
    .church-nav a,
    .park-nav a,
    .natural-nav a {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Center navigation on tablets */
    .temple-nav .nav-wrapper,
    .church-nav .nav-wrapper,
    .park-nav .nav-wrapper,
    .natural-nav .nav-wrapper {
        justify-content: center;
    }

    .temple-nav ul,
    .church-nav ul,
    .park-nav ul,
    .natural-nav ul {
        flex-wrap: wrap;
        min-width: auto;
    }
}

/* Desktop and larger screens (1024px and up) */
@media (min-width: 1024px) {
    .page-header {
        height: 75vh;
        min-height: 450px;
    }

    .page-header h1 {
        font-size: 3.2rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .religious-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .natural-showcase {
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: repeat(4, 120px);
    }

    .natural-item-large {
        grid-column: span 4;
        grid-row: span 2;
    }

    .natural-item-medium {
        grid-column: span 4;
        grid-row: span 2;
    }

    .natural-item-small {
        grid-column: span 4;
        grid-row: span 2;
    }

    .natural-item-smal {
        grid-column: span 2;
        grid-row: span 2;
    }

    .parks-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
        gap: 0.5rem;
    }

    .park-card {
        width: 300px;
    }

    .compact-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .temple-nav a,
    .church-nav a,
    .park-nav a,
    .natural-nav a {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
    }
}

/* Large desktop screens (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .natural-showcase {
        grid-template-rows: repeat(4, 140px);
    }
}

/* High resolution displays (1600px and up) */
@media (min-width: 1600px) {
    .container {
        max-width: 1500px;
    }
}

/* Landscape Mobile Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .page-header {
        height: 100vh;
        min-height: 300px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .header-content {
        padding: 1rem;
    }

    .religious-image,
    .park-image,
    .card-image {
        height: 150px;
        /* Further reduce height in landscape */
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    .religious-card:hover,
    .temple-card:hover,
    .park-card:hover,
    .compact-card:hover,
    .natural-item:hover {
        transform: none;
        /* Remove hover effects on touch devices */
    }

    .religious-card:active,
    .temple-card:active,
    .park-card:active,
    .compact-card:active {
        transform: scale(0.98);
        /* Add press effect instead */
    }

    .explore-btn:active {
        transform: scale(0.95);
    }
}

/* Print styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .page-header {
        height: auto;
        min-height: auto;
        background: none !important;
    }

    .religious-card,
    .temple-card,
    .park-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --teal-primary: #000000;
        --teal-dark: #000000;
        --orange-primary: #000000;
        --orange-dark: #000000;
        --gray-dark: #000000;
        --white: #ffffff;
        --cream-bg: #ffffff;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --cream-bg: #1a1a1a;
        --white: #2d2d2d;
        --gray-dark: #ffffff;
        --gray-medium: #404040;
    }

    body {
        background-color: var(--cream-bg);
        color: #e0e0e0;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes headerZoom {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--teal-primary);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--teal-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Error boundary styling */
.error-boundary {
    padding: 2rem;
    text-align: center;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    margin: 1rem;
}

/* Performance optimizations */
.religious-card,
.temple-card,
.park-card,
.compact-card {
    will-change: transform;
    contain: layout style paint;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Improve text rendering */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection styles */
::selection {
    background: var(--teal-light);
    color: var(--white);
}

::-moz-selection {
    background: var(--teal-light);
    color: var(--white);
}