/* ========================================
   St. James' Anglican Church - Main Styles
   ======================================== */

/* ========================================
   Skip to Content (Accessibility)
   ======================================== */

.skip-to-content {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--deep-sea, #1a3a4a);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-to-content:focus {
    top: 0;
    color: #fff;
}

:root {
    --deep-sea: #1a3a4a;
    --ocean-blue: #2d5a6b;
    --ocean-light: #3d7a8f;
    --mist: #e8f0f2;
    --warm-sand: #f5f1eb;
    --soft-gold: #c9a959;
    --gold-text: #8a7129; /* Darker gold for text on light backgrounds - WCAG AA compliant */
    --gold-dark: #a88a3d;
    --driftwood: #8b7355;
    --storm-grey: #4a5568;
    --white: #ffffff;
    --soft-shadow: 0 4px 30px rgba(26, 58, 74, 0.1);
    --card-shadow: 0 8px 40px rgba(26, 58, 74, 0.12);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    background-color: var(--warm-sand);
    color: var(--deep-sea);
    line-height: 1.7;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    line-height: 1.2;
}

a {
    color: var(--ocean-blue);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--soft-gold);
}

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

/* ========================================
   Navigation
   ======================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s ease;
    background: transparent;
    box-sizing: border-box;
}

nav.scrolled,
nav.solid {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--soft-shadow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--white);
    transition: color 0.3s;
}

nav.scrolled .logo,
nav.solid .logo {
    color: var(--deep-sea);
}

.logo-icon {
    width: 45px;
    height: 45px;
}

.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s;
}

nav.scrolled .nav-links a,
nav.solid .nav-links a {
    color: var(--deep-sea);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--soft-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
}

.mobile-menu span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s;
}

nav.scrolled .mobile-menu span,
nav.solid .mobile-menu span {
    background: var(--deep-sea);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    background: var(--white);
    padding: 1.5rem;
    box-shadow: var(--soft-shadow);
    z-index: 999;
    overflow-x: hidden;
}

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

.mobile-nav a {
    display: block;
    padding: 0.75rem 0;
    color: var(--deep-sea);
    font-weight: 500;
    border-bottom: 1px solid var(--mist);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    height: 100vh;
    min-height: 700px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(165deg, var(--deep-sea) 0%, var(--ocean-blue) 50%, #3d6b7a 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 100%;
    background: var(--warm-sand);
    border-radius: 100% 100% 0 0;
    animation: wave 8s ease-in-out infinite;
}

.wave:nth-child(2) {
    bottom: 10px;
    opacity: 0.5;
    animation-delay: -2s;
    animation-duration: 10s;
}

.wave:nth-child(3) {
    bottom: 20px;
    opacity: 0.3;
    animation-delay: -4s;
    animation-duration: 12s;
}

@keyframes wave {
    0%, 100% { transform: translateX(-2%) translateY(0); }
    50% { transform: translateX(2%) translateY(10px); }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
    padding: 0 5%;
    max-width: 900px;
    animation: fadeUp 1.2s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-cross {
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-divider {
    width: 80px;
    height: 2px;
    background: var(--soft-gold);
    margin: 2rem auto;
}

.hero-verse {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
}

/* ========================================
   Page Header (for inner pages)
   ======================================== */

.page-header {
    background: linear-gradient(165deg, var(--deep-sea) 0%, var(--ocean-blue) 100%);
    padding: 10rem 5% 5rem;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    position: relative;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.breadcrumb {
    position: relative;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
    /* Override generic nav styles that bleed in */
    display: block;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    max-width: none;
    z-index: auto;
    padding: 0;
    background: none;
    backdrop-filter: none;
    box-shadow: none;
}

.breadcrumb a {
    color: var(--soft-gold);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--soft-gold);
    color: var(--deep-sea);
    box-shadow: 0 4px 20px rgba(201, 169, 89, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(201, 169, 89, 0.4);
    color: var(--deep-sea);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--deep-sea);
}

.btn-outline {
    background: transparent;
    color: var(--ocean-blue);
    border: 2px solid var(--ocean-blue);
}

.btn-outline:hover {
    background: var(--ocean-blue);
    color: var(--white);
}

/* ========================================
   Sections
   ======================================== */

section {
    padding: 6rem 5%;
    max-width: 100vw;
    overflow-x: hidden;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-label {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-text);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--deep-sea);
    margin-bottom: 1.5rem;
}

.section-desc {
    color: var(--storm-grey);
    font-size: 1.1rem;
}

/* Section Backgrounds */
.bg-white {
    background: var(--white);
}

.bg-sand {
    background: var(--warm-sand);
}

.bg-mist {
    background: var(--mist);
}

.bg-dark {
    background: var(--deep-sea);
    color: var(--white);
}

.bg-dark .section-title {
    color: var(--white);
}

.bg-dark .section-desc {
    color: rgba(255, 255, 255, 0.8);
}

.bg-dark .section-label {
    color: var(--soft-gold);
}

/* ========================================
   Cards
   ======================================== */

.card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-body {
    padding: 2rem;
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--mist), var(--white));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 2px solid var(--soft-gold);
}

.card-icon svg {
    width: 32px;
    height: 32px;
    color: var(--ocean-blue);
}

/* ========================================
   Team Cards
   ======================================== */

.team-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.team-photo {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--ocean-blue), var(--deep-sea));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.team-photo svg {
    width: 60%;
    height: 60%;
    opacity: 0.3;
}

.team-info {
    padding: 2rem;
}

.team-info h3 {
    font-size: 1.5rem;
    color: var(--deep-sea);
    margin-bottom: 0.5rem;
}

.team-role {
    color: var(--gold-text);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.team-info p {
    color: var(--storm-grey);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.team-contact a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ocean-blue);
    font-size: 0.9rem;
}

/* ========================================
   Calendar Styles
   ======================================== */

.calendar-container {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.calendar-header {
    background: var(--ocean-blue);
    color: var(--white);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-header h3 {
    font-size: 1.5rem;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-nav button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-nav button:hover {
    background: rgba(255,255,255,0.3);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--storm-grey);
    background: var(--mist);
}

.calendar-day {
    padding: 1rem;
    min-height: 100px;
    border: 1px solid var(--mist);
    position: relative;
}

.calendar-day.other-month {
    background: var(--warm-sand);
    color: var(--storm-grey);
    opacity: 0.5;
}

.calendar-day.today {
    background: rgba(201, 169, 89, 0.1);
}

.day-number {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.calendar-event {
    background: var(--ocean-blue);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.calendar-event:hover {
    background: var(--deep-sea);
}

.calendar-event .event-title {
    font-weight: 600;
}

.calendar-event .event-time {
    font-size: 0.65rem;
    opacity: 0.9;
}

.calendar-event.service-alt {
    background: var(--driftwood);
    color: var(--white);
}

.calendar-event.service-alt:hover {
    background: #6b5a45;
}

.calendar-event.prayer {
    background: var(--mist);
    color: var(--deep-sea);
}

.calendar-event.prayer:hover {
    background: #d0e0e4;
}

.calendar-event.special {
    background: var(--soft-gold);
    color: var(--deep-sea);
}

/* Communion indicator */
.communion-icon {
    margin-left: 0.25rem;
    font-size: 0.7rem;
    opacity: 0.9;
}

.calendar-event.communion {
    border-left: 2px solid var(--soft-gold);
}

/* ========================================
   Announcements
   ======================================== */

.announcement-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    display: flex;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.announcement-card:hover {
    transform: translateY(-5px);
}

.announcement-date {
    background: var(--ocean-blue);
    color: var(--white);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.announcement-date .day {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 600;
    line-height: 1;
}

.announcement-date .month {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.announcement-content {
    padding: 2rem;
    flex: 1;
}

.announcement-tag {
    display: inline-block;
    background: var(--mist);
    color: var(--ocean-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.announcement-tag.urgent {
    background: #fef2f2;
    color: #dc2626;
}

.announcement-tag.event {
    background: rgba(201, 169, 89, 0.2);
    color: var(--gold-dark);
}

.announcement-content h3 {
    font-size: 1.4rem;
    color: var(--deep-sea);
    margin-bottom: 0.75rem;
}

.announcement-content p {
    color: var(--storm-grey);
    margin-bottom: 1rem;
}

/* ========================================
   Gallery
   ======================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
    cursor: pointer;
    box-shadow: var(--soft-shadow);
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 58, 74, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    color: var(--white);
    font-size: 1.2rem;
}

/* ========================================
   Contact Form
   ======================================== */

.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--deep-sea);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--mist);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--ocean-blue);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ========================================
   Footer
   ======================================== */

footer {
    background: var(--deep-sea);
    color: var(--white);
    padding: 4rem 5% 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--soft-gold);
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--soft-gold);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.diocese-link {
    color: var(--soft-gold);
    text-decoration: none;
}

.diocese-link:hover {
    text-decoration: underline;
}

/* ========================================
   Utility Classes
   ======================================== */

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

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item.large {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }

    section {
        padding: 4rem 5%;
    }

    /* Force all inline grid layouts to single column on mobile */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Fix images in grid layouts */
    [style*="grid-template-columns"] img {
        max-width: 100% !important;
        height: auto !important;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .announcement-card {
        flex-direction: column;
    }

    .announcement-date {
        flex-direction: row;
        gap: 0.5rem;
        padding: 1rem;
        min-width: auto;
    }

    .announcement-date .day {
        font-size: 2rem;
    }

    .calendar-day {
        min-height: 60px;
        padding: 0.5rem;
    }

    .calendar-day-header {
        padding: 0.5rem;
        font-size: 0.7rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr !important;
    }

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

    .contact-form {
        padding: 2rem;
    }

    /* Ensure flex containers wrap */
    [style*="display: flex"] {
        flex-wrap: wrap !important;
    }

    /* Fix any fixed-width elements */
    [style*="max-width"] {
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 8rem 5% 3rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.85rem;
    }

    /* Calendar mobile: horizontal scroll for small screens */
    .calendar-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .calendar-grid {
        min-width: 500px;
    }

    .calendar-event {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }

    .calendar-event .event-time {
        display: none;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--ocean-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 900;
    box-shadow: 0 4px 20px rgba(26, 58, 74, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--soft-gold);
    color: var(--deep-sea);
    transform: translateY(-3px);
}

/* ========================================
   Lightbox Touch Support
   ======================================== */
.lightbox {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* ========================================
   Gallery overlay: always visible on touch
   ======================================== */
@media (hover: none) {
    .gallery-overlay {
        opacity: 1;
    }
}
