/* Swimming Hub Landing Page Styles */
/* Version: 1.4.1 */
/* Last Updated: 2025-03-15 */

/* ============================================
   HIDE ASTRA THEME HEADER/NAV/FOOTER
   ============================================ */
body.swimming-hub-page .ast-above-header,
body.swimming-hub-page .ast-below-header,
body.swimming-hub-page .ast-main-header-wrap,
body.swimming-hub-page .site-header,
body.swimming-hub-page #masthead,
body.swimming-hub-page .ast-primary-header,
body.swimming-hub-page .ast-mobile-header-wrap,
body.swimming-hub-page .main-header-bar,
body.swimming-hub-page .ast-header-break-point,
body.swimming-hub-page .site-footer,
body.swimming-hub-page .ast-footer-overlay,
body.swimming-hub-page .ast-small-footer,
body.swimming-hub-page #colophon,
body.swimming-hub-page footer.site-footer {
    display: none !important;
}

/* Remove ALL padding/margin from Astra containers */
body.swimming-hub-page,
body.swimming-hub-page #page,
body.swimming-hub-page #content,
body.swimming-hub-page .site-content,
body.swimming-hub-page .ast-container,
body.swimming-hub-page .site-main,
body.swimming-hub-page .entry-content,
body.swimming-hub-page article,
body.swimming-hub-page .ast-article-single,
body.swimming-hub-page .ast-separate-container .ast-article-single,
body.swimming-hub-page .ast-separate-container .ast-article-post,
body.swimming-hub-page .ast-plain-container,
body.swimming-hub-page .post-content,
body.swimming-hub-page .page-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Override Astra's default content padding */
body.swimming-hub-page .ast-separate-container .ast-article-single {
    background: transparent !important;
    padding: 0 !important;
}

body.swimming-hub-page .ast-separate-container #primary {
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
.swimming-hub-wrapper {
    --deep-blue: #1a1a1a;
    --pool-blue: #2d2d2d;
    --mint-green: #6fcf8a;
    --ocean-blue: #7ec8e8;
    --light-blue: #a8e4f9;
    --foam-white: #e8f4f8;
    --card-bg: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
    width: 100vw;
    min-height: 100vh;
    background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    overflow-x: hidden;
    color: var(--text-primary);
    line-height: 1.6;
    
    /* Full-bleed: break out of WordPress container */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: 0;
    padding-right: 0;
}

.swimming-hub-wrapper *,
.swimming-hub-wrapper *::before,
.swimming-hub-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.swimming-hub-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.water-layer {
    position: absolute;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(95, 186, 125, 0.04) 25%, 
        rgba(91, 164, 201, 0.06) 50%, 
        rgba(95, 186, 125, 0.04) 75%, 
        transparent 100%
    );
    animation: waterFlow 20s linear infinite;
}

.water-layer-1 {
    top: 0;
    opacity: 0.5;
    animation-duration: 25s;
}

.water-layer-2 {
    top: 33%;
    opacity: 0.3;
    animation-duration: 20s;
    animation-direction: reverse;
}

.water-layer-3 {
    top: 66%;
    opacity: 0.4;
    animation-duration: 30s;
}

@keyframes waterFlow {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Bubbles */
.bubbles-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.bubble {
    position: absolute;
    bottom: -50px;
    background: radial-gradient(circle at 30% 30%, rgba(95, 186, 125, 0.4), rgba(91, 164, 201, 0.15));
    border-radius: 50%;
    animation: bubbleRise linear infinite;
    opacity: 0;
}

.bubble:nth-child(1) { left: 5%; width: 20px; height: 20px; animation-duration: 12s; animation-delay: 0s; }
.bubble:nth-child(2) { left: 15%; width: 15px; height: 15px; animation-duration: 10s; animation-delay: 2s; }
.bubble:nth-child(3) { left: 25%; width: 25px; height: 25px; animation-duration: 14s; animation-delay: 1s; }
.bubble:nth-child(4) { left: 35%; width: 12px; height: 12px; animation-duration: 11s; animation-delay: 3s; }
.bubble:nth-child(5) { left: 45%; width: 18px; height: 18px; animation-duration: 13s; animation-delay: 0.5s; }
.bubble:nth-child(6) { left: 55%; width: 22px; height: 22px; animation-duration: 15s; animation-delay: 2.5s; }
.bubble:nth-child(7) { left: 65%; width: 14px; height: 14px; animation-duration: 10s; animation-delay: 1.5s; }
.bubble:nth-child(8) { left: 75%; width: 20px; height: 20px; animation-duration: 12s; animation-delay: 4s; }
.bubble:nth-child(9) { left: 85%; width: 16px; height: 16px; animation-duration: 11s; animation-delay: 0s; }
.bubble:nth-child(10) { left: 95%; width: 24px; height: 24px; animation-duration: 14s; animation-delay: 3s; }
.bubble:nth-child(11) { left: 10%; width: 10px; height: 10px; animation-duration: 9s; animation-delay: 5s; }
.bubble:nth-child(12) { left: 20%; width: 18px; height: 18px; animation-duration: 13s; animation-delay: 6s; }
.bubble:nth-child(13) { left: 30%; width: 14px; height: 14px; animation-duration: 11s; animation-delay: 4s; }
.bubble:nth-child(14) { left: 40%; width: 22px; height: 22px; animation-duration: 15s; animation-delay: 7s; }
.bubble:nth-child(15) { left: 50%; width: 12px; height: 12px; animation-duration: 10s; animation-delay: 2s; }
.bubble:nth-child(16) { left: 60%; width: 20px; height: 20px; animation-duration: 12s; animation-delay: 8s; }
.bubble:nth-child(17) { left: 70%; width: 16px; height: 16px; animation-duration: 14s; animation-delay: 1s; }
.bubble:nth-child(18) { left: 80%; width: 18px; height: 18px; animation-duration: 11s; animation-delay: 5s; }
.bubble:nth-child(19) { left: 90%; width: 14px; height: 14px; animation-duration: 13s; animation-delay: 3s; }
.bubble:nth-child(20) { left: 3%; width: 20px; height: 20px; animation-duration: 12s; animation-delay: 6s; }

@keyframes bubbleRise {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
        transform: translateY(-10vh) scale(1);
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-110vh) scale(0.5);
        opacity: 0;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.swimming-hub-hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.hero-content {
    animation: heroFadeIn 1.5s ease-out;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Brand Name */
.brand-name {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    letter-spacing: 0.1em;
    color: #ffffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.brand-name .amp {
    color: var(--mint-green);
    font-weight: normal;
}

/* Tagline */
.hero-tagline {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: clamp(4rem, 15vw, 10rem);
    line-height: 0.9;
    letter-spacing: 0.05em;
    margin-bottom: 3rem;
    background: linear-gradient(180deg, #ffffff 0%, #6fcf8a 50%, #7ec8e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.scroll-indicator span {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

.scroll-arrow {
    font-size: 1.5rem;
    color: var(--mint-green);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* Wave Divider */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    color: var(--deep-blue);
}

.wave-divider svg {
    width: 100%;
    height: 100%;
}

/* ============================================
   HUB CARDS SECTION
   ============================================ */
.swimming-hub-cards {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem 8rem;
    background: var(--deep-blue);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Individual Card */
.hub-card {
    position: relative;
    display: block;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.75rem;
    text-decoration: none;
    color: var(--text-primary);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.4s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: cardSlideIn 0.8s ease-out backwards;
    animation-delay: calc(var(--card-index) * 0.1s);
}

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.hub-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 60px color-mix(in srgb, var(--card-color) 30%, transparent);
}

.hub-card:hover::before {
    transform: scaleX(1);
}

/* Splash Effect */
.card-splash {
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(0.5) rotate(-20deg);
    pointer-events: none;
}

.hub-card:hover .card-splash {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.splash-svg {
    width: 100%;
    height: 100%;
}

.splash-path {
    fill: var(--card-color);
    opacity: 0.15;
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 2;
}

.card-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--card-color), color-mix(in srgb, var(--card-color) 60%, #000));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--card-color) 40%, transparent);
}

.hub-card:hover .card-icon {
    transform: scale(1.1) rotate(-5deg);
}

.card-icon svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.card-title {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
    color: var(--card-color);
    filter: brightness(1.3);
}

.hub-card:hover .card-title {
    filter: brightness(1.5);
}

.card-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--card-color);
    filter: brightness(1.3);
}

.arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.hub-card:hover .arrow-icon {
    transform: translateX(5px);
}

/* Ripple Effect */
.card-ripples {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 60px;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hub-card:hover .card-ripples {
    opacity: 1;
}

.ripple {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--card-color);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: rippleExpand 1.5s ease-out infinite;
}

.ripple:nth-child(2) {
    animation-delay: 0.3s;
}

.ripple:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes rippleExpand {
    0% {
        width: 20px;
        height: 10px;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 100px;
        opacity: 0;
    }
}

/* ============================================
   BOTTOM SECTION
   ============================================ */
.bottom-section {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 100%);
    padding-bottom: 4rem;
}

.wave-top {
    position: relative;
    top: -1px;
    color: var(--deep-blue);
    transform: rotate(180deg);
}

.cta-section {
    text-align: center;
    padding: 2rem;
}

.cta-section h2 {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #6fcf8a, #7ec8e8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .swimming-hub-hero {
        min-height: 80vh;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hub-card {
        padding: 1.25rem;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.75rem;
    }
    
    .card-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .card-title {
        font-size: 1.35rem;
    }
    
    .card-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .card-splash {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .swimming-hub-cards {
        padding: 2rem 1rem 4rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .bubble,
    .water-layer,
    .swimmer-icon,
    .scroll-arrow,
    .scroll-indicator,
    .title-line {
        animation: none;
    }
    
    .hub-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
}

/* Focus states */
.hub-card:focus {
    outline: 3px solid var(--card-color);
    outline-offset: 4px;
}

.hub-card:focus:not(:focus-visible) {
    outline: none;
}

/* Coming Soon cards */
.hub-card--coming-soon {
    cursor: default;
    opacity: 0.65;
    filter: grayscale(0.3);
    position: relative;
}

.hub-card--coming-soon:hover {
    transform: none;
    box-shadow: none;
}

.coming-soon-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(6px);
    z-index: 2;
}
