/* --- 1. GLOBAL RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Trebuchet MS', sans-serif;
}

body {
    background-color: #f0f7f8;
    color: #333;
    line-height: 1.6;
}

/* --- 2. NAVIGATION --- */
header {
    background-color: #073b4c; 
    padding: 1.2rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3 {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 900;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo {
    height: 80px;
    width: auto;
    border-radius: 50%;
    object-fit: contain;
    box-shadow: 0 0 10px rgba(255, 209, 102, 0.3); 
    transition: transform 0.3s ease;
}

.logo-text {
    color: #ffd166;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 2px;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s;
}

nav ul li a:hover { color: #06d6a0; }

/* --- 3. HERO & BANNER --- */
.hero {
    position: relative;
    height: 450px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.banner-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(80%);
}

.hero-overlay h1 {
    font-size: 4rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

/* --- 4. GALLERY & MODAL --- */
.gallery-section { padding: 80px 5%; background-color: #fff; }

.container-wide { max-width: 1200px; margin: 0 auto; }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.photo-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.photo-card:hover { transform: scale(1.03); }

.photo-card img { width: 100%; height: 100%; object-fit: cover; }

.caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(7, 59, 76, 0.8);
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    padding-top: 100px; 
    left: 0; top: 0; width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
    border: 3px solid #ffd166;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 15px; right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* --- 5. CONTACT FORM (THE FIXED SECTION) --- */
.contact-section { padding: 60px 20px; }

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

h2 { color: #073b4c; text-align: center; font-size: 2rem; margin-bottom: 10px; }

.subtitle { text-align: center; margin-bottom: 30px; color: #666; }

.form-group { margin-bottom: 20px; text-align: left; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #073b4c;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

input:focus, textarea:focus {
    border-color: #06d6a0;
    outline: none;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #ef476f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    background-color: #d63c5e;
    transform: translateY(-2px);
}

/* --- 6. TIP JAR & BEER BUTTON --- */
.tip-jar { padding: 40px 20px; background-color: #ffd166; text-align: center; }

.tip-jar h3 { color: #073b4c; margin-bottom: 10px; }

.beer-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 25px;
    background-color: #073b4c;
    color: #ffd166;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    transition: transform 0.2s;
}

.beer-btn:hover {
    transform: scale(1.1);
    background-color: #06d6a0;
    color: white;
}

/* --- 7. THANK YOU & 404 PAGES --- */
.thank-you-hero, .error-page {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(rgba(7, 59, 76, 0.75), rgba(7, 59, 76, 0.75)), url('../images/surfinusabanner.jpg');
    background-size: cover;
    background-position: center;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thank-you-hero .container, .error-page .container {
    background: white;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 90%;
}

.back-home-btn {
    display: inline-block;
    padding: 15px 35px;
    background-color: #ef476f;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    margin-top: 25px;
    transition: all 0.3s ease;
}

.back-home-btn:hover {
    transform: scale(1.1);
    background-color: #06d6a0;
    box-shadow: 0 5px 15px rgba(6, 214, 160, 0.4);
}

/* --- 8. ICONS & ANIMATIONS --- */
.beer-icon {
    font-size: 8rem !important;
    display: block;
    animation: float 3s ease-in-out infinite;
}

.error-icon {
    font-size: 7rem;
    display: inline-block;
    animation: sway 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes sway {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

/* --- 9. FOOTER --- */
footer { text-align: center; padding: 30px; background: #073b4c; color: white; }

footer p a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

footer p a:hover { color: #ffd166; text-shadow: 0 0 8px rgba(255, 209, 102, 0.6); }

/* --- 9. FOOTER & SOCIALS --- */
footer {
    background: #073b4c;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.socials {
    margin-bottom: 20px;
}

.socials a {
    color: white;
    font-size: 2rem;
    margin: 0 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.socials a:hover {
    color: #ffd166; /* Gold hover */
    transform: translateY(-5px);
}

.charities {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #06d6a0; /* Seafoam color for the links */
}

.charities a {
    color: #06d6a0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.charities a:hover {
    color: #ffd166;
    text-decoration: underline;
}

.footer-divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px auto;
    width: 50%;
}

.tactical-creds {
    font-size: 0.8rem;
    margin-top: 10px;
    opacity: 0.7;
    letter-spacing: 1px;
}

/* --- 10. WEBCAM SECTION STYLES --- */
.webcam-section { 
    padding: 60px 5%; 
    background-color: #f0f7f8; 
    text-align: center; 
}

.webcam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.webcam-card {
    background: #073b4c;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border: 3px solid #ffd166;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.webcam-card .caption {
    position: static; 
    background: #073b4c;
    padding: 15px;
    font-size: 1.1rem;
}

/* --- 11. ABOUT HERO (DESKTOP) --- */
.about-hero {
    background: linear-gradient(rgba(7, 59, 76, 0.6), rgba(7, 59, 76, 0.2)), url('../images/about.jpg');
    background-size: cover;
    background-position: center center;
    padding: 120px 20px;
    text-align: center;
    color: white;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- 12. LOGO LINK --- */
.logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.logo-link:hover { opacity: 0.8; }

/* --- 13. HAMBURGER BUTTON (DESKTOP HIDDEN) --- */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    flex-direction: column;
    gap: 5px;
    z-index: 1002;
    position: relative;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
}

.hamburger.active span {
    background-color: #ffd166; /* Turns gold when menu is open */
}

/* Animation to turn Hamburger into an X */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0; /* Hides the middle bar */
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- 14. FINAL MOBILE OVERHAUL (THE BRAVO-ZULU FIX) --- */
@media (max-width: 768px) {
    nav {
        flex-direction: row; 
        justify-content: space-between;
        padding: 0.5rem 0;
    }

    .hamburger { display: flex; }

    nav ul {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(7, 59, 76, 0.98); 
        width: 260px; 
        height: 100vh;
        padding-top: 100px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    }

    nav ul.active { left: 0; }
    nav ul li a { text-align: center; }

    .about-hero, .hero {
        background-position: 85% center !important; 
        min-height: 350px;
    }

    .hero-overlay h1 { font-size: 2.2rem; }

    .nav-overlay.active { display: block; }

    /* MOBILE MERCH, GALLERY & WEB DESIGN GRID STACK FIX */
    .webcam-grid, .photo-grid, .design-features {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* IPHONE TOUCH INTERACTION RECOVERY */
    .feature-card, .photo-card {
        transform: none !important; /* Disables desktop hover-lift on phone */
        box-shadow: 0 5px 15px rgba(7, 59, 76, 0.1) !important;
        transition: opacity 0.3s ease;
    }
    
    /* Safely simulate a clean touch feedback active-state without freezing */
    .feature-card:active {
        background-color: #eaf3f5;
    }

    .merch-img {
        height: auto !important;
        max-height: 250px;
        padding: 15px !important;
    }
}

/* --- 15. MERCH SECTION (CLEANED & CONSOLIDATED) --- */
.merch-section { padding: 80px 5%; background-color: #fff; }

.merch-section .webcam-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch; 
}

.merch-card {
    display: flex;
    flex-direction: column;
    flex: 1; 
    min-width: 300px; 
    background: #ffffff !important;
    height: 100%; 
    border: 3px solid #ffd166;
    border-radius: 15px;
    overflow: hidden;
    margin: 10px; /* Space between cards */
}

.merch-img {
    width: 100%;
    height: 300px; 
    object-fit: contain; 
    background: #ffffff;
    padding: 30px; 
    flex-shrink: 0; 
}

.merch-card .caption {
    margin-top: auto; 
    padding: 20px;
    background: #073b4c;
    color: white;
    text-align: center;
    position: static; /* Resets the absolute positioning from gallery */
}

.buy-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 30px;
    background-color: #06d6a0; 
    color: #073b4c;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px 20px 50px 20px; 
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.buy-btn:hover {
    background-color: #ffd166;
    transform: rotate(-2deg) scale(1.1);
    box-shadow: 5px 5px 0px #073b4c;
}

.shop-all-btn {
    display: inline-block;
    padding: 20px 50px;
    background-color: #073b4c;
    color: #ffd166;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    border: 4px solid #ffd166;
    border-radius: 10px;
    transition: 0.3s;
}

.shop-all-btn:hover {
    background-color: #ef476f;
    color: white;
    border-color: white;
}

/* --- 16. MASONRY GALLERY --- */
.gallery-hero {
    height: 300px;
    background: linear-gradient(rgba(7, 59, 76, 0.8), rgba(7, 59, 76, 0.8)), url('../images/pipeline.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.masonry-grid {
    column-count: 3; 
    column-gap: 20px;
    width: 100%;
}

.masonry-grid .photo-card {
    display: inline-block; 
    width: 100%;
    margin-bottom: 20px;
    height: auto; 
}

@media (max-width: 900px) {
    .masonry-grid { column-count: 2; }
}

@media (max-width: 600px) {
    .masonry-grid { column-count: 1; }
}

.gallery-section .shop-all-btn:hover {
    background-color: #ffd166 !important;
    color: #073b4c !important;
    transform: scale(1.05);
    border-color: #073b4c !important;
}

/* --- Dynamic Gallery Fade --- */
#catch-of-the-day-grid {
    opacity: 0;
    transform: translateY(10px); /* Starts slightly lower for a 'lift' effect */
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

#catch-of-the-day-grid.fade-in-active {
    opacity: 1;
    transform: translateY(0);
}

input[type="file"] {
    background: #f0f7f8;
    border: 2px dashed #073b4c; /* Tactical dashed look */
    padding: 10px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background: #073b4c;
    color: #ffd166;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    margin-right: 10px;
    cursor: pointer;
    font-weight: bold;
}

input[type="file"]::file-selector-button:hover {
    background: #06d6a0;
    color: white;
}

/* --- 17. WEB DESIGN SECTION --- */
.webdesign-section {
    padding: 80px 5%;
    background-color: #ffffff;
    text-align: center;
}

.design-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: #f0f7f8;
    padding: 40px 25px;
    border-radius: 15px;
    border: 3px solid #ffd166;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(7, 59, 76, 0.15);
}

.feature-icon {
    font-size: 3rem;
    color: #073b4c;
    margin-bottom: 20px;
}

.feature-card h3 {
    color: #073b4c;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
}

/* Smooth color shifts for the buttons in this section */
.webdesign-section .shop-all-btn:hover {
    background-color: #06d6a0 !important;
    border-color: #073b4c !important;
    color: #073b4c !important;
    transform: scale(1.05);
}