/* =========================================
   SomOcean - Premium Ocean Tech Website
   ========================================= */

/* === CSS Variables === */
:root {
  --primary-blue: #0A2540;
  --ocean-blue: #1E5A8E;
  --accent-cyan: #00D4FF;
  --accent-teal: #00B4A6;
  --gold: #FFB81C;
  --white: #FFFFFF;
  --light-gray: #F7F9FC;
  --dark-gray: #2C3E50;
  --text-dark: #1A1A1A;
  --text-light: #6B7280;
  
  --gradient-ocean: linear-gradient(135deg, #0A2540 0%, #1E5A8E 50%, #00B4A6 100%);
  --gradient-hero: linear-gradient(135deg, rgba(10, 37, 64, 0.95) 0%, rgba(30, 90, 142, 0.9) 100%);
  
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.24);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--light-gray);
  overflow-x: hidden;
}

body.rtl {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6 {
  font-family: 'Cairo', 'Outfit', 'Inter', sans-serif;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-blue);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* === Header === */
.header {
  background: rgba(10, 37, 64, 0.98);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo img {
  height: 55px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
  filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(255, 255, 255, 0.4));
}

.logo:hover img {
  transform: scale(1.05);
  filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(255, 255, 255, 0.6));
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  color: var(--white);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
}

.nav-menu a.active {
  background: var(--accent-cyan);
  color: var(--primary-blue);
}

/* Language Switcher Dropdown */
.lang-switcher-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-dropdown {
  position: relative;
}

.lang-dropdown-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  min-width: 80px;
  justify-content: space-between;
}

.lang-dropdown-btn:hover, .lang-dropdown-btn.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--accent-cyan);
}

.lang-dropdown-btn svg {
  transition: var(--transition);
}

.lang-dropdown-btn.active svg {
  transform: rotate(180deg);
}

.lang-dropdown-content {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(10, 37, 64, 0.95);
  backdrop-filter: blur(15px);
  min-width: 160px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  padding: 0.5rem;
  z-index: 1001;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform-origin: top right;
  animation: dropdownFadeIn 0.2s ease-out;
}

body.rtl .lang-dropdown-content {
  right: auto;
  left: 0;
  transform-origin: top left;
}

.lang-dropdown-content.show {
  display: flex;
}

.lang-item {
  padding: 0.75rem 1rem;
  color: var(--white);
  cursor: pointer;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.lang-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
}

.lang-item.active {
  background: var(--accent-cyan);
  color: var(--primary-blue);
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Mobile Menu Toggle Animation */
.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
  position: relative;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* === Hero Section === */
.hero {
  background: var(--gradient-hero);
  color: var(--white);
  padding: 6rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 500px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(10, 37, 64, 0.85) 0%, rgba(30, 90, 142, 0.75) 100%);
  z-index: 0;
}

/* Page-specific hero backgrounds */
body:has([href*="index.html"]) .hero,
body:not([data-page]) .hero {
  background-image: url('../images/hero-home.png');
}

/* For tech page */
[data-page="tech"] .hero {
  background-image: url('../images/hero-tech.png');
}

/* For operations page */
[data-page="operations"] .hero {
  background-image: url('../images/hero-operations.png');
}

/* For products page */
[data-page="products"] .hero {
  background-image: url('../images/hero-products.png');
}

/* For investors page */
[data-page="investors"] .hero {
  background-image: url('../images/hero-investors.png');
}

/* For sustainability page */
[data-page="sustainability"] .hero {
  background-image: url('../images/hero-sustainability.png');
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  max-width: 900px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-block;
  background: var(--accent-cyan);
  color: var(--primary-blue);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.125rem;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.5);
}

/* === Container === */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* === Section === */
.section {
  padding: 5rem 0;
}

.white-section {
  background: var(--white);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 1rem;
  background: var(--gradient-ocean);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.125rem;
}

/* === Grid Layouts === */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* === Cards === */
.card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-ocean);
  opacity: 0;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
}

.card:hover::after {
  opacity: 1;
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-ocean);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.card h3 {
  color: var(--ocean-blue);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-light);
}

.card-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-title {
  font-weight: 700 !important;
  color: var(--primary-blue) !important;
  margin-bottom: 0.75rem !important;
  font-size: 0.9rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-list {
  list-style: none;
  padding: 0;
}

.footer-list li {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* === Feature Box === */
.offer-section {
  background: var(--light-gray);
}

.feature-box {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
}

.feature-box::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-cyan);
  border-radius: 20px 0 0 20px;
  transition: var(--transition);
}

body.rtl .feature-box::before {
  left: auto;
  right: 0;
  border-radius: 0 20px 20px 0;
}

.feature-box:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-lg);
}

body.rtl .feature-box:hover {
  transform: translateX(-8px);
}

.feature-box:hover::before {
  width: 8px;
}

.feature-box h4 {
  color: var(--ocean-blue);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
}

/* === Stats Section === */
.stats-section {
  background: linear-gradient(135deg, #0A2540 0%, #1E5A8E 100%);
  padding: 6rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 3rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--white);
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* === Product Card === */
.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.product-image {
  width: 100%;
  height: 250px;
  background: var(--gradient-ocean);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--white);
}

.product-content {
  padding: 2rem;
}

.product-badge {
  display: inline-block;
  background: var(--accent-cyan);
  color: var(--primary-blue);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

/* === Footer === */
.footer {
  background: var(--primary-blue);
  color: var(--white);
  padding: 4rem 2rem 2rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: block;
  margin-bottom: 1.5rem;
}

.footer-logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.footer-section h3 {
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
}

.footer-section a:hover {
  color: var(--accent-cyan);
  padding-left: 5px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.footer-tagline {
  color: var(--accent-cyan);
  font-style: italic;
  margin-top: 1rem;
  font-size: 1.125rem;
}

/* === CTA Section === */
.cta-section {
  background: var(--gradient-ocean);
  color: var(--white);
  text-align: center;
  padding: 8rem 0;
}

.teal-gradient {
  background: linear-gradient(135deg, #00B4A6 0%, #1E5A8E 100%) !important;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 2rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin: 0 auto 3rem;
  font-size: 1.25rem;
}

.cta-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* === Button Styles === */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1.125rem;
  text-align: center;
}

.btn-primary {
  background: var(--accent-cyan);
  color: var(--primary-blue);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  background: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
}

.btn-primary-light {
  background: var(--white);
  color: var(--primary-blue);
}

.btn-primary-light:hover {
  background: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--ocean-blue);
  color: var(--ocean-blue);
}

.btn-outline:hover {
  background: var(--ocean-blue);
  color: var(--white);
}

.btn-outline-white {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.btn-outline-white:hover {
  background: var(--white);
  color: var(--primary-blue);
  border-color: var(--white);
  transform: translateY(-3px);
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
  }
  
  .nav-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 37, 64, 0.98);
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    z-index: 999;
    overflow-y: auto;
    animation: sideSlideIn 0.3s ease-out;
  }

  @keyframes sideSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }

  body.rtl .nav-menu {
    animation: sideSlideInRtl 0.3s ease-out;
  }

  @keyframes sideSlideInRtl {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }
  
  .nav-menu.active {
    display: flex;
  }

  .nav-menu a {
    font-size: 1.25rem;
    width: 100%;
    text-align: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .hero {
    padding: 4rem 1.5rem;
  }
  
  .container {
    padding: 2rem 1rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .lang-switcher {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .lang-btn {
    padding: 0.5rem;
    font-size: 0.75rem;
  }

  .logo-text {
    font-size: 1.25rem;
  }
}

/* === Utility Classes === */
.text-center { text-align: center; }
.text-white { color: var(--white) !important; }
.text-white-80 { color: rgba(255, 255, 255, 0.8) !important; }
.max-width-800 { max-width: 800px; margin-left: auto; margin-right: auto; }
.no-top-padding { padding-top: 0 !important; }

.intro-text {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.25rem;
  color: var(--text-dark);
  line-height: 1.8;
}

.text-gradient {
  background: var(--gradient-ocean);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
