/* Global Styles */
:root {
    --primary-color: #2c5530;
    --secondary-color: #4a90e2;
    --accent-color: #f5a623;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    padding-top: calc(var(--header-height) + var(--safe-area-inset-top));
    padding-bottom: var(--safe-area-inset-bottom);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background-color: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: var(--header-height);
    padding-top: calc(1rem + var(--safe-area-inset-top));
    transition: transform 0.3s ease;
}

.navbar.hide {
    transform: translateY(-100%);
}

.logo a {
    color: var(--primary-color);
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-links li a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

/* Mobile Navigation */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.3s ease;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        padding: 2rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 1rem 0;
    }

    .nav-links li a {
        display: block;
        padding: 1rem;
        font-size: 1.2rem;
    }
}

/* Hero Section */
.hero {
    min-height: calc(100vh - var(--header-height));
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url('../Whistler_Glacier.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 2rem 1rem;
    position: relative;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    animation: fadeIn 1s ease-out;
}

.hero-left {
    flex: 0 0 45%;
}

.hero-right {
    flex: 0 0 45%;
    text-align: left;
}

.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 2rem;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

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

/* Product Categories */
.product-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 800px;
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.product-categories.show {
    opacity: 1;
    transform: translateY(0);
}

.category-link {
    display: inline-block;
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-align: center;
    width: 100%;
    opacity: 0.9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.category-link:hover,
.category-link:focus {
    background-color: #1e3c21;
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Features Section */
.features {
    padding: 4rem 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    background-color: var(--light-bg);
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.feature-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 5% 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-card i {
        font-size: 2rem;
    }

    .feature-card h3 {
        font-size: 1.2rem;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .feature-card:hover {
        transform: none;
    }

    .cta-button:hover {
        background-color: var(--primary-color);
    }

    .nav-links li a:hover::after {
        width: 0;
    }

    .nav-links li a.active::after {
        width: 100%;
    }
}

/* High DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero {
        background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                         url('../Whistler_Glacier.jpg');
    }
}

/* Landscape Mode Optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }

    .nav-links {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero,
    .cta-button,
    .social-links {
        display: none;
    }

    body {
        padding-top: 0;
    }

    .features {
        display: block;
    }

    .feature-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-left, .hero-right {
        flex: 0 0 100%;
    }

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

    .hero-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 0 1rem;
    }

    .hero-image {
        height: 250px;
    }
} 