/* ===== SHARED STYLES FOR ALL AQUASAFE PAGES ===== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;700&display=swap');

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

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: #333;
}

/* ===== FONT WEIGHT UTILITIES ===== */
.font-light {
    font-weight: 300;
}

.font-heavy {
    font-weight: 700;
}

/* ===== CENTRALIZED GRID SYSTEM ===== */

/* Base Grid Classes */
.grid-container {
    display: grid;
    gap: 40px;
}

/* Services Grid - 4 columns desktop, 2 tablet, 1 mobile */
.services-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: repeat(4, 1fr);
}

/* Lessons Grid - 4 columns desktop, 2 tablet, 1 mobile */
.lessons-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: repeat(4, 1fr);
    /* Add flexbox properties for equal height cards */
}

.lessons-grid .lesson-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lessons-grid .lesson-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.lessons-grid .lesson-description {
    flex-grow: 1;
}

/* Locations Grid - auto-fit with centering */
.locations-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    justify-items: center;
}

/* Stats Grid - 4 columns with centering */
.stats-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

/* Features Grid - 3 items optimized */
.features-grid {
    display: grid;
    gap: 50px;
    grid-template-columns: repeat(3, 1fr);
}

/* Branches and Contact Grids for landing page */
.branches-grid {
    display: grid;
    gap: 50px;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    justify-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-items: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive Grid Breakpoints */
@media (max-width: 1024px) and (min-width: 769px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lessons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid,
    .lessons-grid,
    .features-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .locations-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .branches-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .grid-container,
    .services-grid,
    .lessons-grid,
    .locations-grid,
    .stats-grid,
    .features-grid {
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Center lone items in any grid */
.services-grid > *:only-child,
.lessons-grid > *:only-child,
.locations-grid > *:only-child,
.stats-grid > *:only-child,
.features-grid > *:only-child {
    justify-self: center;
    max-width: 400px;
}

/* ===== SHARED COMPONENTS ===== */

/* ===== FLOATING INSTAGRAM ELEMENT ===== */
.floating-instagram {
    position: fixed;
    right: 20px;
    bottom: 10%;
    transform: translateY(-50%);
    z-index: 9999;
    border-radius: 50px;
    padding: 2px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    animation: floatBounce 3s ease-in-out infinite;
}

.floating-instagram:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 35px rgba(0,0,0,0.3);
}

.instagram-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.instagram-logo {
    width: 35px;
    height: 35px;
    transition: transform 0.3s ease;
}

.instagram-link:hover .instagram-logo {
    transform: scale(1.1);
}

/* Subtle floating animation */
@keyframes floatBounce {
    0%, 100% { transform: translateY(-50%) translateX(0px); }
    25% { transform: translateY(-50%) translateX(3px); }
    50% { transform: translateY(-50%) translateX(0px); }
    75% { transform: translateY(-50%) translateX(-3px); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-instagram {
        right: 15px;
        top: auto;
        bottom: 100px;
        transform: none;
    }
    
    .floating-instagram:hover {
        transform: scale(1.05);
    }
    
    .instagram-link {
        width: 50px;
        height: 50px;
    }
    
    .instagram-logo {
        width: 30px;
        height: 30px;
    }
}

/* Header - Used on all pages */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 300;
    color: #67cff6;
}
.logo img {
    height: 70px; /* Adjust this value based on your logo size */
    width: auto;
    margin-right: 10px; /* To maintain spacing with the swimmer emoji if you keep it */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    font-weight: 300;
}

.nav-menu.mobile-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 999;
}

.nav-menu a {
    text-decoration: none;
    color: #666;
    font-weight: 300;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #4AAFBF;
}

.search-icon {
    font-size: 18px;
    color: #666;
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
}

/* Container - Used throughout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons - Used on multiple pages */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 0 !important;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #67cff6;
    color: white;
}

.btn-primary:hover {
    background: #3A9FAF;
}

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

.btn-secondary:hover {
    background: white;
    color: #4AAFBF;
}

/* Page Header - Used on interior pages */
.page-header {
    background: #e7fdff;
    padding: 20px 0;
    margin-top: 80px;
}

.page-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 36px;
    color: #333;
    font-weight: 300;
}

.breadcrumb {
    color: #999;
    font-size: 14px;
    font-weight: 300;
}

.breadcrumb a {
    color: #999;
    text-decoration: none;
    font-weight: 300;
}

.breadcrumb a:hover {
    color: #4AAFBF;
}

/* Features Section - Used on multiple pages */
.features {
    padding: 80px 0;
    background: white;
}

.features h2 {
    text-align: center;
    font-size: 36px;
    color: #4AAFBF;
    margin-bottom: 60px;
    font-weight: 300;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 50% !important;
    background: #67cff6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.feature-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 300;
}

.feature-content p {
    color: #666;
    line-height: 1.6;
    font-weight: 300;
}

/* Special Needs Section - Used on all pages */
.special-needs {
    background: #FFFF00;
    padding: 60px 0;
    text-align: center;
}

.special-needs h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 300;
}

.special-needs p {
    color: #666;
    font-size: 18px;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 300;
}

/* Why Choose Us Section - Specific to About page */
.why-choose {
    background: #67cff6;
    color: white;
    padding: 60px 0 20px 0;
    text-align: center;
}

.why-choose h2 {
    font-size: 40px;
    font-weight: 300;
    margin-bottom: 20px;
}

/* Testimonials Section - Used on all pages */
.testimonials {
    background: #67cff6;
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.yelp-rating {
    margin-bottom: 40px;
}

.yelp-image {
    max-width: 300px;
    height: auto;
    margin: 0 auto 30px;
    display: block;
    border-radius: 0 !important;
}

.testimonial-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    height: 200px;
}

.testimonial {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.testimonial.active {
    opacity: 1;
}

.testimonial-quote {
    font-size: 32px;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.3);
    font-weight: 300;
}

.testimonial-text {
    font-size: 24px;
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.4;
    font-weight: 300;
}

.testimonial-author {
    font-size: 16px;
    opacity: 0.8;
    font-weight: 300;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}

/* ===== UPDATED FOOTER STYLES ===== */
.footer {
    background: #333;
    color: white;
    padding: 40px 0 20px 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-regions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.footer-region h4 {
    color: #67cff6;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-region p {
    margin: 8px 0;
    font-size: 14px;
    font-weight: 300;
}

.footer-region strong {
    font-weight: 700;
    margin-right: 5px;
}

.footer-phone {
    color: white;
    text-decoration: underline;
    font-weight: 300;
    transition: opacity 0.3s ease;
}

.footer-phone:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-divider {
    width: 100%;
    height: 1px;
    background: #555;
    margin: 30px 0 20px 0;
}

.copyright {
    font-size: 14px;
    opacity: 0.7;
    font-weight: 300;
    text-align: center;
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer-regions {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
    
    .footer-region h4 {
        justify-content: center;
    }
}

/* Back to Top Button - Used on all pages */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #67cff6;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: 700;
}

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

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablet */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .nav-menu.mobile-open {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .page-header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .page-title {
        font-size: 28px;
    }
}
