/* ========================================
   Workboat Sales - Modern Design System
   ======================================== */

/* CSS Custom Properties */
:root {
  /* Colors - Maritime Theme */
  --primary-900: #0a1929;
  --primary-800: #0d2137;
  --primary-700: #102a44;
  --primary-600: #153d5e;
  --primary-500: #1a4f78;
  --primary-400: #2d6a8f;
  --primary-300: #4a8db5;
  --primary-200: #7eb3d4;
  --primary-100: #b8d9ed;
  --primary-50: #e6f2f9;

  /* Accent Colors - Warm Amber/Orange */
  --accent-600: #d35400;
  --accent-500: #e67e22;
  --accent-400: #f39c12;
  --accent-300: #f7b731;
  --accent-200: #fed330;

  /* Teal Accent */
  --teal-600: #0c7489;
  --teal-500: #0fa3b1;
  --teal-400: #20c997;
  --teal-300: #4dd8c0;

  /* Neutrals */
  --neutral-900: #1a1a2e;
  --neutral-800: #2d2d44;
  --neutral-700: #404060;
  --neutral-600: #5c5c7a;
  --neutral-500: #7a7a96;
  --neutral-400: #9999b0;
  --neutral-300: #b8b8c8;
  --neutral-200: #d6d6e0;
  --neutral-100: #ececf1;
  --neutral-50: #f8f9fc;

  --white: #ffffff;
  --black: #000000;

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Typography */
  --font-display: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 40px rgba(230, 126, 34, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal: 400;
  --z-tooltip: 500;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--neutral-800);
  background-color: var(--neutral-50);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-900);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-500) 0%,
    var(--accent-600) 100%
  );
  color: var(--white);
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

.btn-outline-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  background: transparent;
  border: 1.5px solid var(--primary-400);
  color: var(--primary-500);
}

.btn-outline-sm:hover {
  background: var(--primary-500);
  color: var(--white);
  border-color: var(--primary-500);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-search {
  background: linear-gradient(
    135deg,
    var(--accent-500) 0%,
    var(--accent-600) 100%
  );
  color: var(--white);
  padding: var(--space-4) var(--space-6);
  font-weight: 600;
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* ========================================
   Header
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background: rgba(10, 25, 41, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--white);
}

.logo-icon {
  font-size: var(--text-2xl);
}

.logo-accent {
  color: var(--accent-400);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-links a {
  color: var(--neutral-200);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-400);
  transition: width var(--transition-base);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition-fast);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse at 20% 80%,
      rgba(15, 163, 177, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 20%,
      rgba(230, 126, 34, 0.1) 0%,
      transparent 50%
    );
}

.hero-bg::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23f8f9fc' fill-opacity='1' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,181.3C960,203,1056,213,1152,197.3C1248,181,1344,139,1392,117.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 25, 41, 0.6) 0%,
    rgba(10, 25, 41, 0.85) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-16) 0;
}

.hero-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl));
  color: var(--white);
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.8s ease-out;
}

.text-gradient {
  background: linear-gradient(
    135deg,
    var(--accent-400) 0%,
    var(--accent-200) 50%,
    var(--teal-400) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(var(--text-base), 2vw, var(--text-xl));
  color: var(--neutral-200);
  max-width: 700px;
  margin: 0 auto var(--space-10);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Search Widget */
.search-widget {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  max-width: 900px;
  margin: 0 auto var(--space-12);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.search-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: var(--space-4);
  align-items: end;
}

.search-field {
  text-align: left;
}

.search-field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--neutral-200);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-field select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a4f78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.search-field select:focus {
  outline: none;
  border-color: var(--accent-400);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--white);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--neutral-300);
}

/* ========================================
   Sections Common
   ======================================== */
.section {
  padding: var(--space-24) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--neutral-600);
  max-width: 600px;
  margin: 0 auto;
}

.section-cta {
  text-align: center;
  margin-top: var(--space-12);
}

/* ========================================
   Featured Vessels
   ======================================== */
.featured-vessels {
  background: var(--neutral-50);
}

.vessel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-8);
}

.vessel-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.vessel-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.vessel-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.vessel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.vessel-card:hover .vessel-image img {
  transform: scale(1.05);
}

.vessel-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.vessel-badge {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-500);
  color: var(--white);
  border-radius: var(--radius-full);
}

.vessel-badge.sale {
  background: var(--success);
}

.vessel-badge.charter {
  background: var(--teal-500);
}

.vessel-badge.new {
  background: var(--info);
}

.vessel-info {
  padding: var(--space-6);
}

.vessel-type {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-400);
}

.vessel-title {
  font-size: var(--text-xl);
  margin: var(--space-2) 0 var(--space-3);
}

.vessel-specs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--neutral-600);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--neutral-100);
}

.vessel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vessel-price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary-700);
}

/* ========================================
   Categories
   ======================================== */
.categories {
  background: linear-gradient(
    135deg,
    var(--primary-800) 0%,
    var(--primary-900) 100%
  );
}

.categories .section-title,
.categories .section-subtitle {
  color: var(--white);
}

.categories .section-subtitle {
  color: var(--neutral-300);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-6);
}

.category-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  transition: all var(--transition-base);
}

.category-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
  border-color: var(--accent-400);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
}

.category-card h3 {
  color: var(--white);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.category-count {
  font-size: var(--text-sm);
  color: var(--neutral-400);
}

/* ========================================
   Why Choose Us
   ======================================== */
.why-us {
  background: var(--neutral-50);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-8);
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 2px solid transparent;
}

.feature-card:hover {
  border-color: var(--accent-400);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  font-size: 2rem;
  background: linear-gradient(
    135deg,
    var(--primary-100) 0%,
    var(--teal-300) 100%
  );
  border-radius: var(--radius-xl);
}

.feature-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.feature-card p {
  color: var(--neutral-600);
  font-size: var(--text-sm);
  line-height: 1.7;
}

/* ========================================
   Newsletter
   ======================================== */
.newsletter {
  background: linear-gradient(
    135deg,
    var(--accent-600) 0%,
    var(--accent-500) 50%,
    var(--accent-400) 100%
  );
  padding: var(--space-16) 0;
}

.newsletter-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.newsletter-text h2 {
  color: var(--white);
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.newsletter-text p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-lg);
}

.newsletter-form {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.newsletter-form input {
  min-width: 300px;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
  font-family: var(--font-body);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(26, 79, 120, 0.2);
}

.newsletter-form .btn {
  background: var(--primary-800);
  color: var(--white);
}

.newsletter-form .btn:hover {
  background: var(--primary-900);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--primary-900);
  color: var(--neutral-300);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: var(--space-8);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand p {
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
  line-height: 1.8;
}

.footer-brand .logo {
  margin-bottom: var(--space-4);
}

.social-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  font-size: var(--text-lg);
  transition: background var(--transition-fast);
}

.social-links a:hover {
  background: var(--accent-500);
}

.footer-links h4,
.footer-contact h4 {
  color: var(--white);
  font-size: var(--text-base);
  margin-bottom: var(--space-5);
}

.footer-links ul,
.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-400);
}

.footer-contact li {
  font-size: var(--text-sm);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  font-size: var(--text-sm);
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a {
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--accent-400);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-brand {
    grid-column: span 3;
    margin-bottom: var(--space-4);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--primary-900);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .nav .btn-primary {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-6);
  }

  .vessel-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .newsletter-content {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-form {
    width: 100%;
    flex-direction: column;
  }

  .newsletter-form input {
    min-width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-4);
  }

  .section {
    padding: var(--space-16) 0;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: span 1;
  }
}
