/* =====================================================
   FISH FOR CHARITY – DESIGN SYSTEM
   ===================================================== */

:root {
    --primary: #0077b6;
    --primary-dark: #023e8a;
    --accent: #ffd166;
    --text: #03045e;
    --text-light: #4a5177;
    --white: #ffffff;
    --gray-light: #f7fafd;
    --border: rgba(0, 119, 182, 0.12);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.12);
    --radius-sm: 12px;
    --radius-md: 24px;
    --radius-lg: 48px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-h: 90px;
    --header-h-sm: 64px;
}

/* =====================================================
   RESET & BASE
   ===================================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide number input spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5 {
    line-height: 1.15;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* =====================================================
   HEADER / NAV
   ===================================================== */

header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    height: var(--header-h);
    z-index: 900;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: height 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

header.scrolled {
    height: var(--header-h-sm);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1.5rem;
    max-width: 1300px;
    margin: 0 auto;
}

/* Logo */
.logo>img {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.logo img {
    height: 72px;
    width: auto;
    transition: height 0.35s ease;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}

header.scrolled .logo img {
    height: 48px;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
    white-space: nowrap;
    transition: font-size 0.35s ease, opacity 0.35s ease;
}

header.scrolled .brand-name {
    font-size: 1rem;
}

/* Desktop Nav Links */
nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav ul li a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    position: relative;
    padding-bottom: 2px;
    transition: color 0.2s;
}

nav ul li a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

nav ul li a:not(.btn-primary):hover {
    color: var(--primary);
}

nav ul li a:not(.btn-primary):hover::after {
    width: 100%;
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 1001;
    border: none;
    background: transparent;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--primary);
    border-radius: 4px;
    transition: var(--transition);
    transform-origin: center;
}

/* Animate hamburger → X */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile drawer overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(3, 4, 94, 0.35);
    z-index: 850;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: var(--white) !important;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 119, 182, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--primary);
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid var(--primary);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 119, 182, 0.2);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

/* =====================================================
   HERO
   ===================================================== */

.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-top: var(--header-h);
    background: linear-gradient(155deg, #e9f5fd 0%, var(--white) 60%);
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 119, 182, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* The .container inside .hero provides the two-column layout */
.hero .container {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding-block: 4rem;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 580px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    margin-bottom: 1.25rem;
    color: var(--text);
}

.hero h1 span {
    color: var(--primary);
    font-style: italic;
}

.hero>.container>.hero-content>p,
.hero p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 480px;
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    max-width: 520px;
}

.hero-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

/* =====================================================
   SECTION TAGS
   ===================================================== */

.section-tag {
    display: inline-block;
    background: rgba(0, 119, 182, 0.08);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

/* =====================================================
   MISSION
   ===================================================== */

.mission {
    padding: 7rem 0;
    background: var(--white);
}

.mission-flex {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.mission-text {
    flex: 1;
    min-width: 0;
}

.mission-visual {
    flex: 1;
    min-width: 0;
}

.mission-visual img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    width: 100%;
    object-fit: cover;
    max-height: 440px;
}

.mission h2 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    margin-bottom: 1.25rem;
}

.mission p {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

/* Stats */
.stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-item .number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.stat-item .label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =====================================================
   SERVICES
   ===================================================== */

.services {
    padding: 7rem 0;
    background: var(--gray-light);
}

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

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 0.75rem;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 520px;
    margin: 0 auto;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.donate-card {
    background: #f0f7ff;
    border: 1.5px solid var(--primary);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 119, 182, 0.08);
}

.donate-card:hover {
    box-shadow: 0 20px 50px rgba(0, 119, 182, 0.15);
}

/* DONATION PRESETS */
.preset-btn {
    background: var(--white);
    border: 1.5px solid #dde4f0;
    color: var(--text);
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.preset-btn:hover {
    border-color: var(--primary);
    background: #f0f7ff;
}

.preset-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.2);
}

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.service-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* =====================================================
   SIGNUP CTA (Home Page)
   ===================================================== */

.signup-cta {
    padding: 7rem 0;
    text-align: center;
}

.signup-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 4rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    max-width: 800px;
    margin: 0 auto;
}

.registration-open h2,
.registration-closed h2 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    margin-bottom: 0.75rem;
}

.registration-open p,
.registration-closed p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.registration-closed .small {
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.7;
}

/* =====================================================
   SIGNUP PAGE
   ===================================================== */

.signup-hero {
    padding-top: var(--header-h);
    padding-bottom: 5rem;
    background: linear-gradient(to bottom, var(--gray-light), var(--white));
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
}

.signup-hero .container {
    width: 100%;
}

.signup-hero .signup-box {
    margin-top: 3rem;
}

.signup-hero .signup-box h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 0.5rem;
}

.signup-hero .signup-box>p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Form */
.signup-form {
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row.single {
    grid-template-columns: 1fr;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid #dde4f0;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fafcff;
    color: var(--text);
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

.waiver-container {
    background: #f9fbff;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid #dde4f0;
    margin-bottom: 1.25rem;
}

.waiver-container h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.waiver-text {
    height: 140px;
    overflow-y: auto;
    padding: 0.85rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid #eaeff8;
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 0.9rem;
}

.waiver-text ul {
    margin: 0.4rem 0 0.6rem 1.4rem;
    list-style: disc;
}

.waiver-text ul li {
    margin-bottom: 0.2rem;
}

.waiver-text p {
    margin-bottom: 0.65rem;
}


.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    -webkit-appearance: checkbox;
    /* Safari compatibility */
    appearance: checkbox;
    cursor: pointer;
}

/* Captcha spacing */
.cf-turnstile {
    margin: 1.25rem 0;
}

/* Submit button */
#submitBtn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Form messages */
.form-message {
    display: none;
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.form-message.success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
    display: block;
}

.form-message.error {
    background: #fff0f0;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
    display: block;
}

/* =====================================================
   FOOTER
   ===================================================== */

footer {
    background: var(--gray-light);
    border-top: 1px solid var(--border);
    padding: 5rem 0 2.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3.5rem;
}

.footer-brand .logo img {
    height: 60px;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.footer-links h4,
.footer-social h4 {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 1rem;
}

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

.footer-links ul li a {
    font-size: 0.9rem;
    color: var(--text-light);
    transition: color 0.2s;
}

.footer-links ul li a:hover {
    color: var(--primary);
}

.footer-social p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* =====================================================
   RESPONSIVE BREAKPOINTS
   ===================================================== */

/* =====================================================
   EVENT CALENDAR
   ===================================================== */

.calendar-wrapper {
    margin-top: 5rem;
    padding-top: 5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.calendar-wrapper h2 {
    margin-bottom: 1rem;
}

.calendar-wrapper p {
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-inline: auto;
}

#calendar {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    font-family: inherit;
}

/* FullCalendar Overrides */
:root {
    --fc-border-color: rgba(0, 119, 182, 0.1);
    --fc-event-bg-color: var(--primary);
    --fc-event-border-color: var(--primary);
    --fc-today-bg-color: rgba(0, 119, 182, 0.05);
    --fc-button-bg-color: var(--primary);
    --fc-button-border-color: var(--primary);
    --fc-button-hover-bg-color: var(--primary-dark);
    --fc-button-hover-border-color: var(--primary-dark);
    --fc-button-active-bg-color: var(--primary-dark);
    --fc-button-active-border-color: var(--primary-dark);
}

.fc .fc-toolbar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text);
}

.fc .fc-button {
    text-transform: capitalize;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.fc .fc-daygrid-day-number {
    font-weight: 600;
    color: var(--text-light);
    padding: 8px;
    text-decoration: none;
}

.fc .fc-col-header-cell-cushion {
    padding: 10px;
    color: var(--text);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    text-decoration: none;
}

.fc-event {
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.fc-event:hover {
    transform: scale(1.02);
}

.fc-event:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .calendar-wrapper {
        margin-top: 3rem;
        padding-top: 3rem;
    }

    #calendar {
        padding: 0.75rem;
        border-radius: var(--radius-sm);
    }

    .fc .fc-toolbar-title {
        font-size: 1.1rem;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        gap: 1rem;
    }

    .fc .fc-button {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .fc .fc-list-event-title {
        font-size: 0.9rem;
    }
}

/* EVENT DETAILS PAGE */
.event-detail-header {
    text-align: left;
    margin-bottom: 2rem;
}

.event-grid {
    align-items: start;
}

.info-group h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    display: inline-block;
}

#event-type-badge {
    background: var(--primary);
    color: var(--white);
    margin-bottom: 1.5rem;
}

.event-info p {
    margin-bottom: 1rem;
}

.event-info ul li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--text-light);
}

@media (max-width: 1024px) {
    .event-grid {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }

    .event-grid .signup-box {
        position: static !important;
    }
}

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
        padding-block: 3rem;
        gap: 2.5rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content p {
        margin-inline: auto;
    }

    .cta-group {
        justify-content: center;
    }

    .hero-image {
        max-width: 480px;
        width: 100%;
    }

    .brand-name {
        display: none;
        /* hide text on tablet — logo alone is enough */
    }

    .mission-flex {
        flex-direction: column;
        gap: 2.5rem;
    }

    .mission-text,
    .mission-visual {
        width: 100%;
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
    :root {
        --header-h: 70px;
        --header-h-sm: 56px;
    }

    /* Show hamburger, hide desktop nav */
    .menu-toggle {
        display: flex;
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(75vw, 280px);
        height: 100dvh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 900;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 2rem;
    }

    nav ul.active {
        right: 0;
    }

    nav ul li a {
        font-size: 1.1rem;
    }

    /* Sections */
    .mission {
        padding: 4rem 0;
    }

    .services {
        padding: 4rem 0;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .signup-cta {
        padding: 4rem 0;
    }

    .signup-box {
        padding: 2.5rem 1.5rem;
        border-radius: var(--radius-md);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats {
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: 1;
    }

    footer {
        padding: 3.5rem 0 2rem;
    }

    .signup-hero .signup-box {
        margin-top: 1.5rem;
    }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
    .cta-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }

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