/* FreeDivers - Premium Freediving Website Styles */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Montserrat:wght@200;300;400;500;600&display=swap');

:root {
    --primary-dark: #001219;
    --primary-blue: #005f73;
    --accent-teal: #0a9396;
    --accent-light: #94d2bd;
    --action-color: #ffb703;
    --action-hover: #ee9b00;
    --text-light: #f8f9fa;
    --text-dim: #ced4da;
    /* Brighter dim text */

    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;

    --glass-bg: rgba(0, 18, 25, 0.4);
    /* Darker glass for better contrast */
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-blur: 15px;

    --transition-speed: 0.4s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    /* Default background is transparent so page-bg shows through */
    background-color: transparent;
    color: var(--text-light);
    line-height: 1.7;
    /* Increased line height for elegance */
    overflow-x: hidden;
}

/* Fallback for pages without background image (like home video) */
body:not(:has(.page-bg)) {
    background-color: var(--primary-dark);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.1;
}

h1 {
    font-size: 6rem;
    /* Significantly bigger */
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    /* Stronger shadow for readability */
}

h2 {
    font-size: 4rem;
    /* Bigger */
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h3 {
    font-size: 2.2rem;
    font-weight: 500;
    /* Lighter weight for elegance */
    color: var(--accent-light);
    margin-bottom: 0.8rem;
    font-style: italic;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Utilities */
.section {
    padding: 8rem 0;
}

.dark-bg {
    background: linear-gradient(to bottom, #001219, #002b36);
}

.center-text {
    text-align: center;
}

.section-badge {
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 2px;
    color: var(--accent-teal);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.btn-primary,
.btn-outline {
    display: inline-block;
    padding: 1rem 2rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--action-color);
    color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--action-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(238, 155, 0, 0.2);
}

.btn-outline {
    border: 2px solid var(--text-light);
    color: var(--text-light);
    margin-top: 2rem;
}

.btn-outline:hover {
    background-color: var(--text-light);
    color: var(--primary-dark);
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
    padding: 1.5rem 0;
}

#navbar.scrolled {
    background-color: rgba(0, 18, 25, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-light);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-dim);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-light);
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-light);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 18, 25, 0.4), rgba(0, 18, 25, 0.7));
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 1rem;
    z-index: 1;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--accent-light);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Text Rotation Animation */
.text-transition {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.text-hidden {
    opacity: 0;
    transform: translateY(-20px);
}

.text-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Reveal Classes (JS trigger) */
.reveal-left,
.reveal-right,
.reveal-up {
    opacity: 0;
    transition: all 1s ease-out;
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-up {
    transform: translateY(50px);
}

.in-view {
    opacity: 1;
    transform: translate(0, 0);
}

/* About Section */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    filter: brightness(0.9);
}

.image-accent {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-teal);
    z-index: -1;
    border-radius: 4px;
}

.about-text h3 {
    margin-bottom: 2rem;
    font-weight: 300;
    color: var(--text-light);
    border-left: 3px solid var(--accent-teal);
    padding-left: 1rem;
}

/* Courses Section */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    padding: 2.5rem;
    border-radius: 12px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.card-subtitle {
    margin-bottom: 1.5rem;
    font-style: italic;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.feature-list li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.feature-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
}

/* Expeditions */
.expedition-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.exp-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-teal);
    transition: all 0.3s ease;
}

.exp-card:hover {
    background: rgba(255, 255, 255, 0.06);
    padding-left: 2.5rem;
}

.exp-content h3 {
    margin-bottom: 0.5rem;
}

/* .icon-large replaced by .exp-media */
.exp-media {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    filter: grayscale(100%) brightness(0.8);
    transition: filter 0.5s ease, transform 0.5s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.exp-card:hover .exp-media {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.02);
}

.exp-media img,
.exp-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.exp-media video {
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.exp-card:hover .exp-media video {
    opacity: 1;
}

/* Media Section */
.reverse {
    direction: rtl;
    /* Quick hack but flex-direction is better for layout control */
}

/* Reset text direction for content inside reverse grid */
.reverse>* {
    direction: ltr;
}

.split-layout.reverse {
    grid-template-columns: 1fr 1fr;
}

.tags {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag {
    background: rgba(10, 147, 150, 0.2);
    color: var(--accent-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--accent-teal);
}

.camera-lens-effect {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.8));
    border: 10px solid var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(10, 147, 150, 0.3);
}

.lens-content {
    font-size: 5rem;
}

/* Bermuda Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    text-align: center;
    margin-top: 4rem;
}

.feature-item h3 {
    color: var(--accent-light);
    margin-bottom: 1rem;
}

/* Gallery - Premium Grid */
.gallery-section {
    padding: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 400px;
    /* Increased height */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: grayscale(100%);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-overlay span {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    color: var(--text-light);
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* Contact */
.social-links {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
    color: white;
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 900px) {
    h1 {
        font-size: 3rem;
    }

    .split-layout,
    .split-layout.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .features-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        height: auto;
    }

    .gallery-item {
        height: 250px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(0, 18, 25, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem 0;
        gap: 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }

    .mobile-menu-btn {
        display: block;
        cursor: pointer;
        padding: 10px;
    }

    .mobile-menu-btn span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--text-light);
        margin: 6px 0;
        transition: 0.3s;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Backgrounds */
.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    object-fit: cover;
}

.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 18, 25, 0.75);
    /* Darken text */
    z-index: -1;
}

.page-overlay.blue-tint {
    background: linear-gradient(rgba(0, 20, 40, 0.7), rgba(0, 95, 115, 0.5));
}

/* Smoother Text Transition */
.hero-text-container {
    position: relative;
    height: 300px;
    /* Increased from 200px to fit 6rem text */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-phrase {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 2s ease-in-out, transform 2s ease-out;
    /* Smoother dissolve */
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.hero-phrase.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: rgba(0, 18, 25, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-teal);
    border-radius: 50px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.music-player:hover {
    transform: scale(1.05);
}

.music-btn {
    background: none;
    border: none;
    color: var(--accent-light);
    cursor: pointer;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.music-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--action-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-light);
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-light);
    font-family: var(--font-body);
    transition: border-color 0.3s, background 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-teal);
    background: rgba(255, 255, 255, 0.1);
}

.contact-links {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.link-item:hover {
    color: var(--accent-light);
}

@media (max-width: 900px) {
    .hero-phrase {
        font-size: 2.5rem;
    }
}

/* Bermuda Page Background Effect */
.bermuda-bg {
    filter: brightness(0.5);
    /* Darkened for readability */
}

.bermuda-overlay {
    background: rgba(0, 0, 0, 0.4);
    /* Consistent dark overlay */
}

/* About Page Background Effect */
.about-bg {
    filter: grayscale(100%) brightness(0.4);
}

.about-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Contact Page Background Effect */
.contact-bg {
    filter: grayscale(100%) brightness(0.4);
    object-fit: cover;
}

.contact-overlay {
    background: rgba(0, 0, 0, 0.6);
    /* Slightly darker for form readability */
}

/* Freediving Spots */
.spots-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 4rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.spot-card {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 3rem;
}

.spot-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
    line-height: 1;
}

.spot-content {
    flex: 1;
}

.spot-content h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-light);
}

.badge {
    background: var(--action-color);
    color: var(--primary-dark);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    font-family: var(--font-body);
    vertical-align: middle;
}

.spot-desc {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-dim);
}

.spot-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--accent-teal);
}

.spot-details li {
    font-size: 0.95rem;
}

.spot-details strong {
    color: var(--accent-light);
}

/* Weather Widget */
.weather-section {
    padding-top: 4rem;
    padding-bottom: 8rem;
}

.weather-widget {
    margin-top: 3rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 300px;
    padding: 2.5rem 4rem;
}

.weather-loading {
    font-style: italic;
    color: var(--text-dim);
}

.weather-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: opacity 0.5s ease;
}

.hidden {
    display: none;
    opacity: 0;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#weather-icon {
    width: 64px;
    height: 64px;
}

.temp-container {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1;
}

.unit {
    font-size: 1.5rem;
    vertical-align: top;
    margin-left: 5px;
    color: var(--accent-teal);
}

.weather-details {
    text-align: center;
}

#weather-desc {
    font-size: 1.2rem;
    text-transform: capitalize;
    margin-bottom: 0.5rem;
}

.time-display {
    color: var(--accent-light);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .spot-card {
        flex-direction: column;
        gap: 1rem;
        padding: 2rem;
    }
    
    .spot-number {
        font-size: 3rem;
    }
}