/* Main Styles for Ocean Depths Website */


/* 
 * CRITICAL TEXT DISPLAY FIX
 * Add this to the TOP of your styles.css file 
 */

/* Hero section emergency fix */
.hero-section h1.hero-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: white !important;
    z-index: 20 !important;
    position: relative !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8) !important;
    font-weight: 700 !important;
}

.hero-section p.hero-subtitle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: white !important;
    z-index: 20 !important;
    position: relative !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8) !important;
    margin-bottom: 5rem;
}

/* Coral reef section emergency fix */
#coral-reefs h2.section-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #4fd1c5 !important; /* teal-300 */
    z-index: 20 !important;
    position: relative !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
    font-weight: 700 !important;
}

#coral-reefs p.section-description {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: white !important;
    z-index: 20 !important;
    position: relative !important;
    margin-bottom: 5rem !important;
    background-color: #433e3eb1;
    border-radius: 5%;
   
}

/* Force visible container */
.container {
    position: relative !important;
    z-index: 15 !important;
    padding: 2rem !important;
}

/* Emergency override for all text elements in these sections */
#coral-reefs *, .hero-section * {
    color: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Force the background overlay to be behind text */
.hero-section .bg-blue-900,
#coral-reefs .parallax-bg {
    z-index: 5 !important;
}

/* Let's reinforce text visibility for all key elements */
.text-teal-300, .text-teal-200, .text-white, .text-xl, .text-2xl {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Base Styles */
:root {
    --primary: #38b2ac; /* teal-500 */
    --primary-dark: #2c7a7b; /* teal-600 */
    --primary-light: #81e6d9; /* teal-300 */
    --secondary: #90cdf4; /* blue-300 */
    --blue-dark: #2a4365; /* blue-900 */
    --blue-medium: #2c5282; /* blue-800 */
    --blue-light: #4299e1; /* blue-500 */
    --text-light: #e6fffa; /* teal-100 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-family: 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--blue-dark);
    color: #fff;
    line-height: 1.6;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Smooth Scroll Container */
#smooth-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

#smooth-content {
    will-change: transform;
}

/* Header */
#main-header {
    transition: background-color 0.3s ease, padding 0.3s ease;
}

#main-header.scrolled {
    background-color: rgba(42, 67, 101, 0.85); /* blue-900 with opacity */
    backdrop-filter: blur(10px);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.language-selector {
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

/* Mobile Menu */
.mobile-menu {
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-title {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}

.hero-loaded .hero-title,
.hero-loaded .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.scroll-prompt {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.scroll-prompt:hover {
    opacity: 1;
}

/* Parallax Backgrounds */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    will-change: transform;
}

/* Section Animations */
.section-title,
.section-description {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.section-title.is-inview,
.section-description.is-inview {
    opacity: 1;
    transform: translateY(0);
}

[data-scroll] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

[data-scroll].is-inview {
    opacity: 1;
    transform: translateY(0);
}

/* Stats */
.stats {
    background-color: rgba(26, 45, 66, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Pattern Background */
.bg-pattern {
    background-image: url('images/ocean-pattern.svg');
    background-repeat: repeat;
    background-size: 200px;
}

/* Impact & Action Cards */
.impact-card .bg-teal-500 {
    background-color: #38b2ac !important; /* Ensure teal color is applied */
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: 100% !important;
    border-radius: 9999px; /* Full rounded */
    transition: width 1s ease-in-out;
  }
  
  /* Add animation effect when scrolled into view */
  .impact-card:hover .bg-teal-500 {
    filter: brightness(1.2);
    box-shadow: 0 0 5px rgba(56, 178, 172, 0.7);
  }
  
  /* Ensure outer bar is visible */
  .impact-card .bg-blue-900 {
    background-color: #2a4365 !important;
    overflow: hidden;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Make sure text labels are visible */
  .impact-card .flex.justify-between span {
    color: #cbd5e0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Make indicator title more visible */
  .impact-card .text-sm.font-semibold.text-teal-200 {
    color: #4fd1c5 !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

/* Ocean Animations */
@keyframes wave {
    0% {
        transform: translateX(0) translateZ(0) scaleY(1);
    }
    50% {
        transform: translateX(-25%) translateZ(0) scaleY(0.8);
    }
    100% {
        transform: translateX(-50%) translateZ(0) scaleY(1);
    }
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: url('images/wave.svg') repeat-x;
    background-size: 50% 100px;
    animation: wave 15s infinite linear;
    z-index: 5;
}

.wave.wave-1 {
    opacity: 0.3;
    animation-duration: 20s;
    height: 80px;
}

.wave.wave-2 {
    opacity: 0.5;
    animation-duration: 15s;
    animation-delay: -5s;
    height: 90px;
}

.wave.wave-3 {
    opacity: 0.2;
    animation-duration: 30s;
    animation-delay: -10s;
    height: 70px;
    bottom: 10px;
}

/* Bubble Animation */
@keyframes bubble {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) scale(1.5);
        opacity: 0;
    }
}

.bubble {
    position: absolute;
    bottom: -50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 2;
    animation: bubble 15s ease-in-out infinite;
}

.bubble:nth-child(1) {
    width: 40px;
    height: 40px;
    left: 10%;
    animation-duration: 20s;
}

.bubble:nth-child(2) {
    width: 20px;
    height: 20px;
    left: 20%;
    animation-duration: 15s;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    width: 50px;
    height: 50px;
    left: 35%;
    animation-duration: 25s;
    animation-delay: 5s;
}

.bubble:nth-child(4) {
    width: 30px;
    height: 30px;
    left: 50%;
    animation-duration: 18s;
    animation-delay: 3s;
}

.bubble:nth-child(5) {
    width: 25px;
    height: 25px;
    left: 65%;
    animation-duration: 22s;
    animation-delay: 7s;
}

.bubble:nth-child(6) {
    width: 15px;
    height: 15px;
    left: 80%;
    animation-duration: 17s;
    animation-delay: 4s;
}

.bubble:nth-child(7) {
    width: 35px;
    height: 35px;
    left: 90%;
    animation-duration: 23s;
    animation-delay: 9s;
}

/* Fish Animation */
@keyframes fishSwim {
    0% {
        transform: translateX(-100px);
    }
    50% {
        transform: translateX(calc(100vw + 100px));
    }
    51% {
        transform: translateX(calc(100vw + 100px)) scaleX(-1);
    }
    100% {
        transform: translateX(-100px) scaleX(-1);
    }
}

.fish {
    position: absolute;
    z-index: 3;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
    animation: fishSwim 40s ease-in-out infinite;
}

.fish-1 {
    top: 20%;
    width: 60px;
    animation-duration: 45s;
}

.fish-2 {
    top: 40%;
    width: 40px;
    animation-duration: 35s;
    animation-delay: 5s;
}

.fish-3 {
    top: 60%;
    width: 70px;
    animation-duration: 50s;
    animation-delay: 10s;
}

/* CTA Section */
.bg-fixed {
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

/* Media Queries */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .wave {
        height: 60px;
        background-size: 50% 60px;
    }
    
    .wave.wave-1 {
        height: 50px;
    }
    
    .wave.wave-2 {
        height: 55px;
    }
    
    .wave.wave-3 {
        height: 45px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease forwards;
}

.fade-up {
    animation: fadeUp 1s ease forwards;
}

.scale-in {
    animation: scaleIn 1s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Water Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(129, 230, 217, 0.2);
    animation: ripple 4s ease-out infinite;
}

/* Custom Scroll Bar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--blue-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}