/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Image Optimization Styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Modern image optimization */
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    transform: translateZ(0);
}

picture {
    display: block;
}

/* Critical resource hints for performance */
img[fetchpriority="high"] {
    content-visibility: auto;
}

/* Lazy loading placeholder styles */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Image aspect ratio containers for preventing layout shift */
.image-container {
    position: relative;
    overflow: hidden;
}

.image-container::before {
    content: '';
    display: block;
    padding-top: var(--aspect-ratio, 66.67%); /* 3:2 default */
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation Styles */
.navbar {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    height: 80px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 5px;
}

.nav-logo h2 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.hosted-by {
    color: #b3b3b3;
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #de0021;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hamburger Animation */
.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 40px 40px 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="90">🏒</text></svg>') repeat;
    opacity: 0.1;
    animation: float 20s infinite linear;
}

.hero-content {
    width: 50%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #de0021, #ff4d6d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hosted-by-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    color: #b3b3b3;
    font-weight: 400;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hosted-by-logo {
    width: 240px;
    height: 240px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.hosted-by-logo:hover {
    transform: scale(1.05);
}

.trails-west-text {
    font-weight: 600;
    color: #fff;
}

.hero h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-date {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #de0021;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-location {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(45deg, #de0021, #ff4d6d);
    color: #fff;
    box-shadow: 0 4px 15px rgba(222, 0, 33, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #b8001a, #de0021);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(222, 0, 33, 0.6);
    animation: bounce 0.6s ease;
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: #fff;
    color: #000000;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.hero-image {
    width: 50%;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    will-change: transform;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* About Section */
.about {
    padding: 5rem 0;
    background: linear-gradient(135deg, #ffffff 0%, #b3b3b3 100%);
    position: relative;
}

.about::before {
    content: '🏆';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.1;
    animation: pulse 3s infinite;
}

.about h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #000000;
    position: relative;
}

.about h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(45deg, #de0021, #ff4d6d);
    border-radius: 2px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #666;
}

.about-features {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature {
    background: rgba(222, 0, 33, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #de0021;
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(222, 0, 33, 0.15);
    transform: translateX(10px);
}

.feature h3 {
    color: #de0021;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.feature p {
    color: #808080;
    font-size: 1rem;
}

.about-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.about-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    will-change: transform;
    transform: translateZ(0); /* Force hardware acceleration */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-img:hover {
    transform: translateY(-5px) translateZ(0);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Tournament Info Section */
.tournament-info {
    padding: 5rem 0;
    background: #fff;
    position: relative;
}

.tournament-info::before {
    content: '🎉';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 3rem;
    opacity: 0.1;
    animation: bounce 2s infinite;
}

.tournament-info h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #000000;
    position: relative;
}

.tournament-info h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(45deg, #000000, #333333);
    border-radius: 2px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: #fff;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(222, 0, 33, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.info-card:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.info-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.info-card p {
    margin-bottom: 0.5rem;
}

.schedule-preview {
    background: linear-gradient(135deg, #b3b3b3 0%, #808080 100%);
    padding: 2.5rem;
    border-radius: 15px;
    margin-top: 3rem;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.schedule-preview::before {
    content: '🏒';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.schedule-preview h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #000000;
    position: relative;
}

.schedule-day {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #b3b3b3 100%);
    border-radius: 12px;
    border-left: 4px solid #de0021;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.schedule-day:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.schedule-day h4 {
    color: #de0021;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.schedule-day p {
    color: #808080;
    margin-bottom: 0.3rem;
}

.schedule-day h4 {
    color: #2a5298;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.schedule-day p {
    color: #666;
    margin-bottom: 0.3rem;
}

/* Registration Section */
.registration {
    padding: 5rem 0;
    background: #b3b3b3;
}

.registration h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #000000;
}

.registration-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.registration-info h3 {
    color: #de0021;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.registration-info ol {
    margin-left: 1.5rem;
    margin-bottom: 2rem;
}

.registration-info li {
    margin-bottom: 0.5rem;
    color: #333333;
}

.registration-details {
    margin-top: 2rem;
}

.registration-details h4 {
    color: #de0021;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.registration-details ul {
    margin-left: 1.5rem;
}

.registration-details li {
    margin-bottom: 0.5rem;
    color: #333333;
}

.registration-form {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.registration-form h3 {
    color: #de0021;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #000000;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #808080;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #de0021;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: #fff;
}

.contact h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #000000;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    color: #de0021;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h4 {
    color: #de0021;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-item p {
    color: #808080;
    line-height: 1.5;
}

.contact-form {
    background: #b3b3b3;
    padding: 2rem;
    border-radius: 10px;
}

.contact-form h3 {
    color: #de0021;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: #000000;
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #de0021;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #b3b3b3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #de0021;
}

.footer-bottom {
    border-top: 1px solid #333333;
    padding-top: 1rem;
    text-align: center;
    color: #b3b3b3;
}

/* Tablet Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero-img {
        max-width: 450px;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .navbar {
        height: 90px;
        padding: 0.5rem 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-logo {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        flex: 1;
    }
    
    .logo-img {
        height: 50px;
        flex-shrink: 0;
    }
    
    .nav-logo-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    
    .nav-logo h2 {
        font-size: 1.4rem;
        line-height: 1.2;
    }
    
    .hosted-by {
        font-size: 0.8rem;
        line-height: 1.1;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 90px;
        flex-direction: column;
        background-color: #333333;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1.5rem 0;
    }
    
    .nav-link {
        padding: 1rem 0;
        font-size: 1.2rem;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 120px 20px 40px 20px;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        order: 1;
    }
    
    .hero-image {
        display: block;
        order: 2;
        text-align: center;
        margin-top: 2rem;
    }
    
    .hero-img {
        max-width: 280px;
        height: auto;
        border-radius: 15px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    }
    
    .hero h1 {
        font-size: 2.5rem;
        white-space: nowrap;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .about-content,
    .registration-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-images {
        grid-template-columns: 1fr;
    }
    
    .hosted-by-hero {
        font-size: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hosted-by-logo {
        width: 180px;
        height: 180px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        text-align: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Center form buttons on mobile */
    .registration-form button,
    .contact-form button {
        display: block;
        margin: 1.5rem auto 0 auto;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
        white-space: nowrap;
    }
    
    .hero h2 {
        font-size: 1.3rem;
    }
    
    .hero-date {
        font-size: 1.2rem;
    }
    
    .hero-location {
        font-size: 1rem;
    }
    
    .hosted-by-hero {
        font-size: 0.9rem;
    }
    
    .hosted-by-logo {
        width: 150px;
        height: 150px;
    }
    
    .about h2,
    .tournament-info h2,
    .registration h2,
    .contact h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .registration-form,
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Center form buttons on small mobile */
    .registration-form button,
    .contact-form button {
        display: block;
        margin: 1.5rem auto 0 auto;
        text-align: center;
        width: 90%;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateX(-100px);
    }
    100% {
        transform: translateX(calc(100vw + 100px));
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.hero-content > *,
.about-content > *,
.info-card,
.registration-content > *,
.contact-content > * {
    animation: fadeInUp 0.6s ease-out;
}

/* Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}
