/* Homepage Specific Styles */

/* --- Hero Section --- */
.hero-home {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    padding-top: 120px;
    /* More space for header */
}

/* Homepage Header Overrides */
.site-header {
    background: transparent !important;
    border-bottom: none !important;
    position: absolute !important;
    width: 100%;
    box-shadow: none !important;
}

.site-header .logo,
.site-header nav a {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('https://images.unsplash.com/photo-1492629707267-289d04ba443c?ixlib=rb-4.0.3&auto=format&fit=crop&w=2400&q=80');
    /* Snowy peaks */
    background-size: cover;
    background-position: center;
}

.hero-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Richer Winter Blue Gradient */
    background: linear-gradient(135deg,
            rgba(30, 58, 95, 0.7) 0%,
            rgba(26, 33, 44, 0.8) 50%,
            rgba(10, 20, 35, 0.95) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-home h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .hero-home h1 {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }
}

/* --- Hero Search & Buttons --- */
.hero-search {
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input-wrapper {
    position: relative;
}

.hero-search input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    padding-left: 3rem;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 1rem center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-search input:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    margin-top: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    text-align: left;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.search-autocomplete.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.1s;
    border-bottom: 1px solid var(--color-border);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--color-bg-alt);
}

.autocomplete-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-location {
    background: var(--color-primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-location:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
    background: var(--color-primary-dark);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* --- Hero Stats --- */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.hero-stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 600px) {
    .hero-stats {
        gap: 1.5rem;
        margin-top: 3rem;
    }

    .hero-stat-number {
        font-size: 1.5rem;
    }
}

/* --- Quick Filters --- */
.quick-filters {
    background: var(--color-bg);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
    /* Removed sticky positioning to prevent overlapping with content below */
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .quick-filters {
    background: #1a202c;
    border-bottom-color: #2d3748;
}

.quick-filters-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    /* Space for scrollbar */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.quick-filters-inner::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome */
}

.filter-chip {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.filter-chip:hover {
    background: var(--color-border);
    transform: translateY(-1px);
}

.filter-chip.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* --- Map Section --- */
.map-section {
    padding: 4rem 1rem;
    background: var(--color-bg);
}

.map-section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    color: var(--color-heading);
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.full-map-container {
    height: 500px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 4px solid white;
}

[data-theme="dark"] .full-map-container {
    border-color: #2d3748;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* --- Featured Grid --- */
.featured-resorts {
    padding: 4rem 1rem;
    background: var(--color-bg-alt);
    max-width: 1200px;
    margin: 0 auto;
}

.featured-resorts .section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.featured-card-wrapper {
    position: relative;
}

.featured-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

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

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.featured-card:hover img {
    transform: scale(1.05);
}

.featured-card .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    z-index: 2;
}

.no-image-featured {
    width: 100%;
    height: 100%;
    background: #1a202c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-image-featured::after {
    content: "No Image";
    color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.featured-card h3 {
    margin: 0;
    font-size: 1.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.featured-card .location {
    font-size: 0.9rem;
    opacity: 0.9;
    display: block;
    margin-bottom: 0.5rem;
}

.card-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.card-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.compare-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
    color: var(--color-text);
}

.featured-card-wrapper:hover .compare-btn {
    opacity: 1;
    transform: translateY(0);
}

.compare-btn:hover {
    background: var(--color-primary);
    color: white;
}

.compare-btn.active {
    opacity: 1;
    transform: translateY(0);
    background: var(--color-primary);
    color: white;
}

/* --- Region Browse --- */
.region-browse {
    padding: 4rem 1rem;
    background: var(--color-bg);
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.region-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--color-text);
    display: block;
}

.region-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.region-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.region-card .count {
    display: inline-block;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
}

/* --- Why Choose Us --- */
.why-section {
    padding: 4rem 1rem;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
}

.why-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.why-inner h2 {
    font-size: 2.25rem;
    margin-bottom: 3rem;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.why-item h3 {
    margin: 1rem 0;
    font-size: 1.25rem;
}

.why-item p {
    color: var(--color-text-muted);
    line-height: 1.6;
}

.why-icon {
    width: 80px;
    height: 80px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* --- Compare Tray --- */
.compare-tray {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s;
}

.compare-tray.hidden {
    transform: translateY(100%);
}

[data-theme="dark"] .compare-tray {
    background: #1a202c;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.compare-tray-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.compare-tray-title {
    font-weight: 700;
    margin-right: 1rem;
}

.compare-items {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.compare-item-preview {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--color-border);
}

.compare-item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-remove {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.compare-tray-actions {
    display: flex;
    gap: 1rem;
}

.btn-tray {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
}

.btn-tray-primary {
    background: var(--color-primary);
    color: white;
    border: none;
}

.btn-tray-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Map Legend */
.map-legend {
    padding: 8px 12px;
    font: 13px/16px system-ui, sans-serif;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    line-height: 20px;
    color: #333;
}

.map-legend strong {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.map-legend i {
    width: 14px;
    height: 14px;
    display: inline-block;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: middle;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.map-legend div {
    margin-bottom: 4px;
}

.map-legend div:last-child {
    margin-bottom: 0;
}