/* =======================================================================
   --- Base Styles & Variables (Self-Contained) ---
======================================================================= */
:root {
    --bg-color: #1d1e21;
    --accent-color: #cb2929;
    --text-color: #ffffff;
    --input-bg: #2a2c30;
    --border-color: #444;
    --font-title: 'Oswald', sans-serif;
    --font-text: 'Poppins', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
.page-container { display: flex; flex-direction: column; min-height: 100vh; }
.btn-submit { width: auto; padding: 15px 40px; font-size: 1.3rem; background-color: var(--accent-color); color: white; border: none; border-radius: 5px; font-family: var(--font-title); text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: background-color 0.3s ease; }
.btn-submit:hover { background-color: #e06c34; }

/* =======================================================================
   --- Waiver Form Page Styles ---
======================================================================= */
body.form-page {
    font-family: var(--font-text);
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: url('../assets/form-back.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* --- Sticky Header --- */
.form-header {
    background-color: var(--bg-color);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* --- Header Layout with Icons --- */
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.form-logo {
    height: 80px;
    flex-shrink: 0;
}
.header-main-text {
    flex-grow: 1;
}
.header-main-text h1 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 0;
    line-height: 1;
}
.header-subtitle {
    font-family: var(--font-text);
    font-size: 1rem;
    color: var(--accent-color);
    margin: 0;
}
.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #ccc;
}
.header-contact span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.header-contact i {
    color: var(--accent-color);
    width: 16px;
    text-align: center;
}

.form-main { padding: 3rem 1rem; width: 100%; flex-grow: 1; }
.waiver-container { max-width: 900px; margin: 0 auto; background-color: rgba(29, 30, 33, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 2.5rem 3rem; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); }
.waiver-intro, .waiver-conclusion { line-height: 1.6; margin-bottom: 2rem; }
.checkbox-prompt { text-align: center; margin: 1rem 0 2rem 0; font-style: italic; color: #e03434; opacity: 0.9; font-weight: 500; }
.checkbox-prompt i { margin-right: 0.5rem; }
.waiver-points { margin: 2rem 0; display: flex; flex-direction: column; gap: 1.5rem; }

/* --- Custom Checkbox Styles --- */
.checkbox-group { display: flex; align-items: flex-start; gap: 1rem; }
.checkbox-group input[type="checkbox"] { flex-shrink: 0; appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border: 2px solid var(--accent-color); border-radius: 4px; margin-top: 2px; cursor: pointer; position: relative; transition: background-color 0.2s ease; }
.checkbox-group input[type="checkbox"]:checked { background-color: var(--accent-color); }
.checkbox-group input[type="checkbox"]:checked::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: white; font-size: 14px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.checkbox-group label { line-height: 1.6; cursor: pointer; }
.checkbox-group label strong { color: var(--text-color); }

/* --- Form Fields --- */
.form-fields { border-top: 1px solid var(--border-color); margin-top: 2rem; padding-top: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.field-group { display: flex; flex-direction: column; }
.field-group label { font-family: var(--font-title); font-size: 1.1rem; margin-bottom: 0.75rem; color: #ddd; }
.field-group input[type="text"], .field-group input[type="email"],.field-group input[type="date"] { background-color: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-color); padding: 12px; border-radius: 5px; font-family: var(--font-text); font-size: 1rem; }
.field-group input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); cursor: pointer; }

/* --- Signature Pad Styles --- */
.signature-pad-wrapper { border: 1px solid var(--border-color); border-radius: 5px; overflow: hidden; }
.signature-pad { width: 100%; height: 150px; cursor: crosshair; }
.clear-button { background: none; border: 1px solid #777; color: #ccc; padding: 5px 10px; border-radius: 4px; cursor: pointer; margin-top: 10px; align-self: flex-start; transition: all 0.2s ease; }
.clear-button:hover { background-color: #333; border-color: #999; }
.submit-container { text-align: center; margin-top: 3rem; }

/* =======================================================================
   --- Mobile Responsiveness ---
======================================================================= */

/* For Tablets and Smaller Desktops */
@media (max-width: 1100px) {
    .header-content {
        flex-wrap: wrap; /* Allow items to wrap */
        justify-content: center; /* Center the wrapped items */
        gap: 0.75rem 1.5rem;
    }
    .header-main-text {
        text-align: center;
        width: 100%;
        order: -1; /* Move the main title to the top when it wraps */
    }
}

/* For Mobile Phones */
@media (max-width: 768px) {
    .waiver-container {
        padding: 2rem 1.5rem;
    }

    .form-header {
        padding: 1rem; /* Reduce padding on small screens */
    }
    .header-main-text h1 {
        font-size: 1.5rem; /* Make main title smaller */
    }
    .header-subtitle {
        font-size: 0.9rem;
    }
    .header-contact {
        /* This makes the contact items wrap individually and cleanly */
        display: contents; 
    }
    .header-contact span {
        font-size: 0.8rem; /* Make contact text smaller */
    }
}


/* --- NEW: Prominent Home Icon Link Style --- */
.header-home-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--accent-color); /* Orange background */
    color: white; /* White icon */
    border-radius: 50%; /* Makes it a circle */
    font-size: 1.4rem;
    text-decoration: none;
    margin-left: 1rem;
    flex-shrink: 0; /* Prevents the button from shrinking */
    transition: all 0.3s ease;
}

.header-home-link:hover {
    background-color: #e03434; /* Slightly lighter orange on hover */
    color: white;
    transform: scale(1.1); /* Makes it pop on hover */
}