/* ========================================
   S.A. PORTCOMMERCE - Main Stylesheet
   Cloudflare Pages Deployment
   ======================================== */

:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --primary-dark: #0d2340;
  --accent: #e8731a;
  --accent-light: #f59e4b;
  --accent-dark: #c45d10;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

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

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
}

.navbar-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
  position: relative;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--primary);
}

.navbar-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-search {
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border-radius: 20px;
  padding: 8px 16px;
  gap: 8px;
}

.navbar-search input {
  border: none;
  background: none;
  outline: none;
  font-size: 0.85rem;
  width: 160px;
  color: var(--gray-700);
}

.navbar-search svg {
  color: var(--gray-400);
  width: 16px;
  height: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
}

.btn-white:hover {
  background: var(--gray-100);
  transform: translateY(-1px);
}

.btn-sm { padding: 6px 16px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,35,64,0.85) 0%, rgba(26,58,92,0.6) 50%, rgba(232,115,26,0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 650px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--accent-light);
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 520px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 2;
  display: flex;
  gap: 24px;
}

.hero-stat {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  padding: 20px 28px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.15);
}

.hero-stat .number {
  font-size: 2rem;
  font-weight: 800;
  display: block;
}

.hero-stat .label {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-block;
  background: rgba(26,58,92,0.08);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.05rem;
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--gray-100);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.service-card-img {
  height: 220px;
  overflow: hidden;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-card-img img {
  transform: scale(1.05);
}

.service-card-body {
  padding: 28px;
}

.service-card-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 10px;
}

.service-card-body p {
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.service-card-body .link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.service-card-body .link:hover {
  gap: 10px;
}

/* ===== ABOUT / PORTCOMMERCE ===== */
.about-section {
  background: var(--gray-50);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.about-content h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.about-content .subtitle {
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 20px;
}

.about-content p {
  color: var(--gray-600);
  margin-bottom: 24px;
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
}

.about-feature .icon {
  width: 32px;
  height: 32px;
  background: rgba(34,197,94,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  flex-shrink: 0;
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
  color: var(--white);
}

.stat-item .stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}

.stat-item .stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ===== GLOBAL TRADE HUB ===== */
.trade-hub {
  background: var(--white);
}

.trade-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.trade-hub-content h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.trade-hub-content p {
  color: var(--gray-500);
  margin-bottom: 24px;
  line-height: 1.8;
}

.trade-features-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.trade-feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.trade-feature-item .tf-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.trade-feature-item .tf-icon.blue { background: rgba(59,130,246,0.1); color: var(--info); }
.trade-feature-item .tf-icon.orange { background: rgba(232,115,26,0.1); color: var(--accent); }
.trade-feature-item .tf-icon.green { background: rgba(34,197,94,0.1); color: var(--success); }

.trade-feature-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.trade-feature-item p {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 0;
  line-height: 1.5;
}

.trade-hub-visual {
  position: relative;
}

.trade-hub-visual img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ===== CHART SECTION (mini dashboard preview) ===== */
.chart-preview {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.chart-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.chart-legend {
  display: flex;
  gap: 16px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.chart-legend-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ===== PARTNERS ===== */
.partners-section {
  background: var(--gray-50);
}

.partners-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  opacity: 0.5;
}

.partner-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===== CTA ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 80px 0;
  text-align: center;
  color: var(--white);
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: var(--transition);
  font-size: 0.85rem;
}

.footer-social a:hover {
  background: var(--accent);
  color: var(--white);
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.85rem;
  color: var(--gray-400);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero h1 { font-size: 2.8rem; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid,
  .trade-hub-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { display: none; }
}

@media (max-width: 768px) {
  .navbar-menu { display: none; }
  .mobile-toggle { display: flex; }
  .navbar-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    gap: 16px;
  }
  .hero { min-height: 500px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .services-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .section { padding: 60px 0; }
  .section-header h2 { font-size: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; }
  .cta-section h2 { font-size: 1.8rem; }
  .cta-buttons { flex-direction: column; align-items: center; }
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PAGE INNER HERO (for subpages) ===== */
.page-hero {
  padding: 140px 0 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  text-align: center;
}

.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 1.05rem;
  opacity: 0.8;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  font-size: 0.85rem;
}

.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--accent-light); }
