/* Global Resets */
* {
    box-sizing: border-box;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeFooter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up-element {
    animation: fadeInUp 0.6s ease-out forwards;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 70px 0 0 0; /* Padding-top matches header height */
    color: #000;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* PERFORMANCE BACKGROUND FIX (Fixes scroll lag) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)), 
                url('https://cdn-imgix.headout.com/media/images/cf37f3c0af7ebd63b513c182f08776ae-Matterhorn%20Glacier%20Paradise%20april.jpg?auto=format&q=90&crop=faces&fit=crop') no-repeat center center;
    background-size: cover;
    will-change: transform;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid #000;
    height: 70px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: black;
}

.logo-text {
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    transition: color 0.2s;
}

.logo-container:hover .logo-text { color: #739aba; }

.swiss-flag {
    background-color: #e63946;
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    font-weight: bold;
    border-radius: 4px;
    line-height: 0;
}

.nav-links-list {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
}

.nav-item-link {
    text-decoration: none;
    color: black;
    transition: color 0.2s;
}

.nav-item-link:hover { color: #e63946; }

/* Navigation Dropdown Logic */
.nav-item-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    min-width: 160px;
    border: 2px solid #000;
    border-radius: 12px;
    list-style: none;
    padding: 10px 0;
    margin: 10px 0 0 0;
    box-shadow: 0 8px 0px rgba(0,0,0,0.1);
    z-index: 1001;
}

.nav-item-dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeFooter 0.2s ease-out;
}

.dropdown-link {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #000;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: left;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background-color: #f8f8f8;
    color: #e63946;
}

/* Invisible bridge for dropdown hover stability */
.nav-item-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px;
}

/* Main Content Layouts */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.main-home { margin-top: 10vh; }

/* Typography */
h1 {
    color: #19191a;
    text-shadow: 3px 4px #1c1c1c5d;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: 900;
    animation: fadeInUp 0.6s ease-out forwards;
}

.h1-home { font-size: 72px; margin-bottom: 40px; }
.h1-resorts { font-size: 80px; margin-bottom: 20px; }

/* Search UI */
.search-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 40px;
    position: relative;
    animation: fadeInUp 0.7s ease-out forwards;
}

.resort-search-input {
    width: 100%;
    padding: 18px 25px;
    font-size: 18px;
    font-weight: 700;
    border: 2px solid #000;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s;
    box-shadow: 0 4px 0px #000;
}

.resort-search-input:focus {
    border-color: #e63946;
    box-shadow: 0 6px 0px #e63946;
    transform: translateY(-2px);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background-color: #e63946;
    color: #fff;
    border: 2px solid #000;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 0px #000;
    user-select: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #ff4d5a;
    transform: translateY(-5px);
    box-shadow: 0 8px 0px #000;
}

/* Resort Grid */
.resort-grid {
    display: grid;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out forwards;
}

@media (min-width: 640px) { .resort-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .resort-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.resort-box {
    position: relative;
    background-color: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid #000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    text-align: left;
    transform: translateZ(0);
}

.resort-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    border-color: #e63946;
}

.resort-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%; 
    background-color: #e5e7eb;
    overflow: hidden;
    border-bottom: 2px solid #000;
}

.resort-image-wrapper img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.resort-box:hover .resort-image-wrapper img { transform: scale(1.1); }
.resort-content { padding: 1.5rem; }
.resort-tag {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #e63946;
    margin-bottom: 0.5rem;
    display: block;
}
.resort-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #000;
    margin: 0;
    text-transform: uppercase;
}

/* Buttons */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 360px;
    animation: fadeInUp 0.6s ease-out forwards;
}

.btn {
    display: block;
    padding: 20px;
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid #000;
    border-radius: 15px;
    transition: all 0.2s;
    text-align: center;
}

.btn:hover { border-width: 3px; opacity: 0.8; }
.btn-red { background-color: #e63946; color: #fff; }
.btn-white { background-color: #fff; color: #000; }

/* ABOUT PAGE SPECIFIC STYLES */
.about-text {
    font-size: 18px;
    max-width: 800px;
    line-height: 1.6;
    color: #333;
    animation: fadeInUp 0.8s ease-out forwards;
    margin-bottom: 20px;
}

.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 60px 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.section-title {
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
}

.value-card {
    background: #fff;
    border: 2px solid #000;
    border-radius: 20px;
    padding: 40px 20px;
    transition: transform 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    border-color: #e63946;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.value-icon { font-size: 40px; margin-bottom: 15px; }
.value-title {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.stats-section {
    width: 100%;
    max-width: 1200px;
    background-color: #000;
    color: #fff;
    padding: 60px 20px;
    border-radius: 30px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 40px;
    margin: 40px 0;
    animation: fadeInUp 1s ease-out forwards;
}

.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-number { font-size: 48px; font-weight: 900; color: #e63946; }
.stat-label { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; }

.cta-banner {
    margin: 80px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-text {
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Footer */
footer {
    text-align: center;
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.95);
    border-top: 2px solid #000;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    animation: fadeFooter 0.6s ease-out forwards;
}

@media (max-width: 768px) {
    .stats-section { display: grid; grid-template-columns: 1fr 1fr; }
    .h1-resorts { font-size: 50px; }
}