/* Care Waves Radio - Modern CSS */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-color: #005EB8; /* NHS Blue */
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    
    --gradient-primary: linear-gradient(135deg, #005EB8 0%, #003d82 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-info: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-warning: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Light mode theme variables (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f5f7fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.15);
    --body-bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Dark mode theme variables */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #252525;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    --card-bg: #2d2d2d;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --body-bg-gradient: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    --primary-color: #4a9eff; /* Lighter blue for better visibility in dark mode */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.8);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--body-bg-gradient);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease, background-image 0.3s ease;
}

/* Top anchor for back to top functionality */
#top {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    visibility: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-4, .display-5 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
}

/* Fixed Header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
}

/* Navigation */
.navbar {
    background-color: rgba(0, 94, 184, 0.95) !important; /* NHS Blue with transparency */
    background-image: url('../images/WebTop.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    background-position: top left;
    background-origin: border-box;
    background-clip: border-box;
    border: none;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    padding: 0.75rem 0;
    min-height: 100%;
}

/* Dark mode navbar adjustments */
[data-theme="dark"] .navbar {
    background-color: rgba(26, 26, 26, 0.95) !important;
}

/* Navigation menu in bottom row */
.navbar-nav {
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
    justify-content: flex-start;
}

/* Align navigation menu with page content */
.navbar .navbar-collapse {
    padding-left: 0;
    padding-right: 0;
    flex: 0 1 auto;
    width: auto;
}

.navbar .navbar-collapse .navbar-nav {
    width: auto;
    margin-right: 0;
}

@media (max-width: 768px) {
    .navbar .navbar-collapse {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        text-align: center;
        padding: 0.75rem 1rem;
        border-radius: var(--border-radius);
        margin: 0.125rem 0;
    }
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.navbar-nav .nav-item.dropdown {
    position: relative;
}

.navbar-nav .nav-link:hover {
    background: rgba(200, 200, 200, 0.3) !important;
    transform: translateY(-2px);
    /* Text color is set from database via auto-generated rules at end of file - do not override */
}

/* Ensure hover preserves database-set text color - this rule will be overridden by auto-generated rules at end of file */
nav.navbar.navbar-dark .navbar-nav .nav-link:hover {
    /* Color inherits from nav.navbar.navbar-dark .navbar-nav .nav-link rule set by database */
}

/* Change burger menu icon to black (light mode) */
.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Dark mode burger menu icon (white) */
[data-theme="dark"] .navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    background-color: var(--card-bg);
    color: var(--text-primary);
    z-index: 1050;
    position: absolute;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.dropdown-item:hover {
    background: var(--light-color);
    color: var(--primary-color);
    transform: translateX(5px);
}


/* Main Content Area */
.main-content {
    margin-top: 120px; /* Account for fixed header with two rows */
    min-height: calc(100vh - 120px);
    position: relative;
}

.main-content::before {
    content: '';
    position: fixed;
    top: 120px; /* Start below the header */
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/background.gif') center/cover;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Dark mode background image adjustment */
[data-theme="dark"] .main-content::before {
    opacity: 0.05;
}

.main-content > * {
    position: relative;
    z-index: 1;
}

/* Content Sections */
.content-section {
    display: none;
    min-height: calc(100vh - 120px);
}

.content-section.active {
    display: block;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/background.gif') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Live Player in Header */
.menu-container-box {
    background: rgba(50, 50, 50, 0.8);
    border-radius: var(--border-radius);
    padding: 2px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    width: fit-content;
    max-width: 100%;
}

.live-player-header {
    background: transparent;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 250px;
}

.live-player-header .player-controls .btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    padding: 0;
}

.now-playing-header {
    flex: 1;
    min-width: 0;
}

.now-playing-header small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.now-playing-header #now_playing {
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
    white-space: normal;
    line-height: 1.1;
    max-height: 2.2em; /* Allow for 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 0.25rem;
    word-wrap: break-word;
    word-break: break-word;
}

/* Ensure br tags work properly */
.now-playing-header #now_playing br {
    display: block;
    content: "";
    margin-top: 0.1em;
}

/* Live Player Modern */
.live-player-modern {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-header h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.player-controls {
    text-align: center;
    margin-bottom: 1.5rem;
}

.player-controls .btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.player-controls .btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.now-playing-modern {
    text-align: center;
}

.now-playing-modern small {
    color: var(--secondary-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#now_playing {
    font-size: 1.1rem;
    color: var(--dark-color);
    font-weight: 600;
    margin-top: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Carousel */
.carousel-section {
    margin-bottom: 0;
}

.carousel-item img {
    height: 400px;
    object-fit: cover;
    filter: brightness(0.8);
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.carousel-caption h5 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.carousel-caption p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img-top {
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-success {
    background: var(--gradient-success) !important;
}

.bg-gradient-info {
    background: var(--gradient-info) !important;
}

.bg-gradient-warning {
    background: var(--gradient-warning) !important;
}

/* Stats */
.stat-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Legacy Stats */
.legacy-stat {
    transition: all 0.3s ease;
}

.legacy-stat:hover {
    transform: scale(1.05);
}

/* Volunteer Icons */
.volunteer-icon {
    transition: all 0.3s ease;
}

.volunteer-icon:hover {
    transform: scale(1.1);
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--primary-color); /* NHS Blue */
    border: none;
}

.btn-primary:hover {
    background: #003d82; /* Darker NHS Blue for hover */
    border: none;
}

.btn-success {
    background: var(--gradient-success);
    border: none;
}

.btn-info {
    background: var(--gradient-info);
    border: none;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color); /* NHS Blue */
    color: var(--primary-color); /* NHS Blue */
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color); /* NHS Blue */
    color: white;
    transform: translateY(-2px);
}

/* Sections */
section {
    position: relative;
}

.bg-light {
    background: var(--card-bg) !important;
    backdrop-filter: blur(10px);
    color: var(--text-primary);
}

/* Cards and containers */
.card {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Background Images for Sections */
.football-background {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/football.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 4rem 0;
    border-radius: var(--border-radius-lg);
}

.request-background {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/request.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 4rem 0;
    border-radius: var(--border-radius-lg);
}

.donation-background {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/ukmoney.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 4rem 0;
    border-radius: var(--border-radius-lg);
}

.volunteer-background {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/volblue.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    color: white;
    padding: 4rem 0;
    border-radius: var(--border-radius-lg);
}

.listen-background {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/listen.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 4rem 0;
    border-radius: var(--border-radius-lg);
}

.vol-background {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/volblue.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 4rem 0;
    border-radius: var(--border-radius-lg);
}

/* Forms */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 94, 184, 0.25);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

.rounded {
    border-radius: var(--border-radius) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        margin-top: 100px; /* Smaller header on mobile */
    }
    
    .content-section {
        min-height: calc(100vh - 100px);
    }
    
    .live-player-header {
        min-width: 200px; /* Smaller width on mobile */
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    
    /* Stack header elements vertically on mobile */
    .navbar .container > div:first-child {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menu-container-box {
        flex-direction: column !important;
        gap: 1rem;
    }
    
    .navbar .container > div:first-child > div:first-child {
        width: 100%;
    }
    
    .navbar .container > div:first-child > div:first-child > div:first-child {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .navbar-brand {
        margin-bottom: 0;
    }
    
    .live-player-header {
        align-self: stretch;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem !important;
        width: 100%;
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }
    
    /* Hide presenter image on mobile */
    #presenter-image-container {
        display: none !important;
    }
    
    /* Simplify On Air section on mobile */
    #current-radio-show {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.25rem !important;
        width: 100%;
    }
    
    #current-radio-show #show-info {
        width: 100%;
    }
    
    #current-show-name {
        font-size: 0.8rem !important;
    }
    
    #current-radio-show span {
        font-size: 0.75rem !important;
    }
    
    /* Ensure mobile menu toggle is visible */
    .navbar-toggler {
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 1031;
    }
    
    /* Mobile menu positioning */
    .navbar-collapse {
        position: relative;
        z-index: 1030;
    }
    
    .live-player-header .player-controls .btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .now-playing-header {
        min-width: 0;
        flex: 1;
    }
    
    .now-playing-header #now_playing {
        font-size: 0.7rem;
    }
    
    .now-playing-header small {
        font-size: 0.65rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .live-player-modern {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .carousel-item img {
        height: 250px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .d-flex.gap-3 .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    /* Extra small mobile adjustments */
    .live-player-header {
        flex-direction: column;
        align-items: flex-start !important;
        padding: 0.5rem;
    }
    
    .live-player-header .player-controls {
        align-self: center;
    }
    
    .now-playing-header {
        width: 100%;
        text-align: center;
    }
    
    #current-radio-show {
        width: 100%;
        text-align: center;
    }
    
    .navbar-brand img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .live-player-modern {
        padding: 1rem;
    }
    
    .player-controls .btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color); /* NHS Blue */
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color); /* NHS Blue */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #003d82; /* Darker NHS Blue */
}

/* Additional Styles for New Elements */
.sport-feature,
.donation-option,
.listen-option,
.request-method,
.contact-info {
    transition: all 0.3s ease;
}

.sport-feature:hover,
.donation-option:hover,
.listen-option:hover,
.request-method:hover,
.contact-info:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.sponsor-logo {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.sponsor-logo:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color); /* NHS Blue */
    box-shadow: var(--shadow-lg);
}

/* Sponsor Scrolling Animation */
.sponsor-scroll-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: linear-gradient(90deg, rgba(248, 249, 250, 0.8) 0%, rgba(248, 249, 250, 0.4) 50%, rgba(248, 249, 250, 0.8) 100%);
    border-radius: var(--border-radius-lg);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.sponsor-scroll-track {
    display: flex;
    align-items: center;
    gap: 2rem;
    animation: scroll-right-to-left 30s linear infinite;
    width: max-content;
}

.sponsor-scroll-track .sponsor-logo {
    flex-shrink: 0;
    min-width: 200px;
    height: 120px;
    margin: 0;
    position: relative;
}

@keyframes scroll-right-to-left {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.sponsor-scroll-container:hover .sponsor-scroll-track {
    animation-play-state: paused;
}

/* Sponsor Logo Tooltip */
.sponsor-logo {
    position: relative;
}

.sponsor-logo .sponsor-tooltip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.sponsor-logo:hover .sponsor-tooltip {
    opacity: 1;
}

/* Responsive adjustments for sponsor scrolling */
@media (max-width: 768px) {
    .sponsor-scroll-track {
        gap: 1.5rem;
        animation-duration: 25s;
    }
    
    .sponsor-scroll-track .sponsor-logo {
        min-width: 150px;
        height: 100px;
    }
}

@media (max-width: 576px) {
    .sponsor-scroll-track {
        gap: 1rem;
        animation-duration: 20s;
    }
    
    .sponsor-scroll-track .sponsor-logo {
        min-width: 120px;
        height: 80px;
    }
}

/* Navbar scroll transition */
.navbar {
    transition: transform 0.3s ease-in-out;
}

/* Form improvements */
.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Form labels in dark background sections */
.request-background .form-label,
.donation-background .form-label,
.football-background .form-label,
.listen-background .form-label,
.vol-background .form-label {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Form success/error messages */
.form-message {
    border-radius: var(--border-radius);
    border: none;
    font-weight: 600;
    box-shadow: var(--shadow);
    animation: slideInDown 0.3s ease-out;
}

.form-message.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.form-message.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button improvements */
.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%;
}

/* Card hover effects */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Loading animation for buttons */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Improved mobile navigation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(0, 94, 184, 0.95); /* NHS Blue with transparency */
        margin-top: 1rem;
        padding: 1rem;
        border-radius: var(--border-radius);
        backdrop-filter: blur(10px);
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Improved mobile forms */
@media (max-width: 576px) {
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* Theme Toggle Switch */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.nav-item .theme-switch {
    margin-left: 0;
}

.nav-item .theme-mode-text {
    margin-right: 0.5rem;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.theme-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-switch input:checked + .theme-slider {
    background-color: #005EB8;
}

.theme-switch input:checked + .theme-slider:before {
    transform: translateX(24px);
}

.theme-switch:hover .theme-slider {
    opacity: 0.9;
}

.theme-switch:focus-within .theme-slider {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Dark mode toggle switch adjustments */
[data-theme="dark"] .theme-slider {
    background-color: #6c757d;
}

[data-theme="dark"] .theme-switch input:checked + .theme-slider {
    background-color: #4a9eff;
}

/* Smaller theme switch */
.theme-switch.small {
    width: 40px;
    height: 20px;
}

.theme-switch.small .theme-slider {
    border-radius: 20px;
}

.theme-switch.small .theme-slider:before {
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
}

.theme-switch.small input:checked + .theme-slider:before {
    transform: translateX(20px);
}

/* Footer dark mode */
[data-theme="dark"] footer {
    background-color: transparent !important;
    color: var(--text-primary);
}

/* Text color adjustments for dark mode */
[data-theme="dark"] .text-muted {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text-primary) !important;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .btn-primary {
        border: 2px solid var(--primary-color); /* NHS Blue */
    }
}

/* Footer paragraph spacing - remove extra margins to prevent double line breaks */
footer p {
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
    line-height: 1.4;
}

footer p:last-child {
    margin-bottom: 0 !important;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .carousel-section,
    footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: none !important;
    }
}

/* Playwrite CU Font */
.playwrite-us-trad-guides-regular {
  font-family: "Playwrite CU", cursive;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

/* News Feed Scrolling Animation */
.news-feed-container {
    position: relative;
    overflow: hidden;
    line-height: 0;
}

.news-feed-container * {
    box-sizing: border-box;
}

.news-feed-scroll {
    animation: scroll-bottom-to-top 60s linear infinite;
    margin: 0;
    padding: 0;
    line-height: 0;
    white-space: normal;
}

.news-feed-scroll .news-item {
    margin: 0;
    line-height: 1.4;
    display: block;
}

.news-feed-scroll .news-item:first-child {
    margin-top: 0;
    padding-top: 0;
}

.news-feed-container:hover .news-feed-scroll {
    animation-play-state: paused;
}

@keyframes scroll-bottom-to-top {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}