/* Labour Party Brand Colors */
:root {
    --labour-red: #E4003B;
    --labour-dark-red: #A4002B;
    --labour-light: #FFFFFF;
    --labour-grey: #6F777B;
    --labour-text: #333333;
    
    /* Light Mode (default) */
    --background: var(--labour-red);
    --card-bg: var(--labour-light);
    --text-primary: var(--labour-text);
    --text-secondary: var(--labour-grey);
    --border-color: var(--labour-red);
}

/* Dark Mode - follows system preference */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #1a1a1a;
        --card-bg: #2d2d2d;
        --text-primary: #e0e0e0;
        --text-secondary: #b0b0b0;
        --border-color: #404040;
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--labour-text);
    margin: 0;
    padding: 0;
}

/* Page Background - Solid Labour Red */
.page-background {
    min-height: 100vh;
    background-color: var(--background);
    padding: 3rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    transition: background-color 0.3s ease;
}

/* Floating Container */
.floating-container {
    max-width: 900px;
    width: 100%;
    background-color: var(--card-bg);
    border-radius: 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .floating-container {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    }
}

/* Header / Profile Section */
.profile-header {
    background-color: var(--card-bg);
    padding: 2rem 2rem;
    text-align: center;
    transition: background-color 0.3s ease;
}

.header-photo-container {
    margin-bottom: 1.5rem;
    width: 100%;
    overflow: hidden;
}

.header-photo {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border: 4px solid var(--labour-red);
}

.header-photo-caption {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0;
    padding: 0 1rem;
    line-height: 1.4;
    opacity: 0.7;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.profile-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--labour-red);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subtitle-part {
    display: inline-block;
}

.subtitle-separator {
    color: var(--labour-red);
    opacity: 0.6;
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 1;
}

.bio {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    max-width: 620px;
    margin: 0.75rem auto 0;
    transition: color 0.3s ease;
}

.bio p {
    color: inherit;
}

/* Contact Section */
.contact-section {
    background-color: var(--card-bg);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 3px solid var(--labour-red);
    transition: background-color 0.3s ease;
}

.contact-text {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    transition: color 0.3s ease;
}

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

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--labour-light);
    color: var(--labour-red);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--labour-dark-red);
    color: var(--labour-light);
    transform: scale(1.1);
}

.social-link i {
    font-size: 1.5rem;
}

/* Page Sections */
.page-section {
    background-color: var(--card-bg);
    border-top: 3px solid var(--labour-red);
    transition: background-color 0.3s ease;
}

.page-section:first-of-type {
    border-top: none;
}

.section-header {
    background-color: var(--labour-red);
    padding: 1.5rem 2rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--labour-light);
}

.content-inner {
    padding: 2rem;
}

.content-inner p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
    font-size: 1rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.content-inner p:last-child {
    margin-bottom: 0;
}

.content-inner p:has(+ .priorities-list) {
    margin-bottom: 0.5rem;
}

.content-inner ul {
    margin-bottom: 1.5rem;
}

.content-inner ul:last-child {
    margin-bottom: 0;
}

/* Priorities List */
.priorities-list {
    list-style: none;
    padding: 0;
    padding-top: 0.25rem;
}

.priorities-list li {
    padding: 1rem 0;
    padding-left: 2.5rem;
    position: relative;
    line-height: 1.7;
    font-size: 1rem;
    border-bottom: 2px solid rgba(228, 0, 59, 0.1);
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.priorities-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.priorities-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--labour-red);
    font-weight: bold;
    font-size: 1.5rem;
    top: 0.8rem;
}

.priorities-list strong {
    color: var(--labour-red);
    font-size: 1.05rem;
}

.priorities-section-header {
    margin-top: 2rem;
    margin-bottom: 0.25rem;
}

/* Contact Form */
.casework-notice {
    background-color: rgba(228, 0, 59, 0.1);
    border-left: 4px solid var(--labour-red);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.casework-notice a {
    color: var(--labour-red);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    transition: color 0.3s ease;
}

.casework-notice a:hover {
    color: var(--labour-dark-red);
}

@media (prefers-color-scheme: dark) {
    .casework-notice {
        background-color: rgba(228, 0, 59, 0.15);
    }
}

.contact-form {
    padding: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 0;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

@media (prefers-color-scheme: dark) {
    .form-group input,
    .form-group textarea {
        border-color: #555;
    }
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--labour-red);
}

.checkbox-group {
    margin-bottom: 2rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    min-width: 20px;
    height: 20px;
    margin-top: 0.15rem;
    cursor: pointer;
    accent-color: var(--labour-red);
}

.checkbox-text {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.submit-btn {
    width: 100%;
    padding: 1.25rem;
    background-color: var(--labour-red);
    color: var(--labour-light);
    border: none;
    border-radius: 0;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background-color: var(--labour-dark-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(228, 0, 59, 0.3);
}

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

/* Priority Cloud Styles */
.priority-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding: 0.25rem 0;
    min-height: 300px;
}

.priority-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.8rem;
    background-color: rgba(228, 0, 59, 0.1);
    border: 2px solid var(--labour-red);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 90px;
    color: var(--text-primary);
}

.priority-bubble:hover {
    transform: scale(1.05);
    background-color: rgba(228, 0, 59, 0.2);
    box-shadow: 0 4px 12px rgba(228, 0, 59, 0.3);
}

.priority-bubble.selected {
    background-color: var(--labour-red);
    border-color: var(--labour-red);
    color: var(--labour-light);
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(228, 0, 59, 0.4);
}

.priority-label {
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    color: inherit;
}

.selection-count {
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--labour-red);
    margin-top: 1rem;
}

.priorities-note {
    font-style: italic;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    transition: color 0.3s ease;
}

#selectedCount {
    font-size: 1.3rem;
    font-weight: 700;
}

@media (prefers-color-scheme: dark) {
    .priority-bubble {
        background-color: rgba(228, 0, 59, 0.15);
        color: var(--text-primary);
    }
    
    .priority-bubble:hover {
        background-color: rgba(228, 0, 59, 0.25);
    }
}

/* Footer */
.footer {
    background-color: var(--labour-red);
    color: var(--labour-light);
    padding: 2rem;
    text-align: center;
}

.footer p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    opacity: 0.9;
}

.footer p:last-child {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-background {
        padding: 1rem 0.5rem;
    }
    
    .profile-header {
        padding: 1.5rem;
    }
    
    .profile-header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .header-photo {
        max-height: 300px;
    }
    
    .contact-section {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
    }
    
    .contact-link {
        justify-content: center;
        font-size: 0.95rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
    }
    
    .social-link i {
        font-size: 1.3rem;
    }
    
    .section-header {
        padding: 1.25rem 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .content-inner {
        padding: 1.5rem;
    }
    
    .content-inner p,
    .priorities-list li {
        font-size: 0.95rem;
    }
    
    .priorities-list li {
        padding-left: 2.25rem;
    }
    
    .priorities-list strong {
        font-size: 1rem;
    }
    
    .form-group label {
        font-size: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 0.95rem;
        padding: 0.7rem 0.85rem;
    }
    
    .submit-btn {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .priority-bubble {
        min-width: 90px;
        padding: 0.3rem 0.8rem;
    }
    
    .priority-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .profile-header h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .header-photo {
        max-height: 250px;
    }
    
    .section-header {
        padding: 1rem 1.25rem;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
    
    .content-inner {
        padding: 1.25rem;
    }
}