/* ============================================
   LABINA - Global Styles
   ============================================ */
@import url('./variables.css');

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-red); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--brand-red-light); }
ul { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); line-height: var(--leading-tight); color: var(--text-primary); }

/* === Container === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-6); }
.container--narrow { max-width: var(--max-width-narrow); }

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-base);
}
.header.scrolled { box-shadow: var(--shadow-md); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-6);
}
.header__logo img { height: 40px; width: auto; }
[data-theme="dark"] .header__logo img { filter: brightness(0) invert(1); }

.header__nav { display: flex; align-items: center; gap: var(--space-8); }
.nav__list { display: flex; gap: var(--space-6); }
.nav__link {
  font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary);
  padding: var(--space-2) 0; position: relative; transition: color var(--transition-fast);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.nav__link::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: var(--brand-red); transition: width var(--transition-base);
}
.nav__link:hover, .nav__link.active { color: var(--text-primary); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: var(--space-4); }

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  border-radius: var(--border-radius-full); padding: var(--space-2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; transition: all var(--transition-fast); color: var(--text-secondary);
}
.theme-toggle:hover { background: var(--brand-navy); color: white; }
.theme-toggle .icon-sun, [data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* Language Selector */
.lang-selector {
  display: flex; border: 1px solid var(--border-color); border-radius: var(--border-radius-full); overflow: hidden;
}
.lang-btn {
  padding: var(--space-1) var(--space-3); font-size: var(--text-xs); font-weight: 600;
  background: transparent; border: none; cursor: pointer; color: var(--text-tertiary);
  transition: all var(--transition-fast); text-transform: uppercase;
}
.lang-btn.active { background: var(--brand-navy); color: white; }

/* Mobile Menu */
.hamburger {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: var(--space-2);
}
.hamburger span {
  width: 24px; height: 2px; background: var(--text-primary);
  transition: all var(--transition-base); border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative; min-height: 85vh; display: flex; align-items: center;
  justify-content: center; overflow: hidden; margin-top: var(--header-height);
}
.hero--small { min-height: 45vh; }
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: var(--hero-gradient);
}
.hero__content {
  position: relative; z-index: 2; text-align: center;
  max-width: 800px; padding: var(--space-8);
}
.hero__title {
  font-size: var(--text-5xl); font-weight: 800; color: white;
  margin-bottom: var(--space-6); text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero__subtitle {
  font-size: var(--text-xl); color: rgba(255,255,255,0.9);
  margin-bottom: var(--space-8); line-height: var(--leading-relaxed);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-8); border-radius: var(--border-radius-full);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  border: 2px solid transparent; cursor: pointer;
  transition: all var(--transition-base); text-decoration: none;
}
.btn--primary {
  background: var(--accent-gradient); color: white; border-color: var(--brand-red);
}
.btn--primary:hover {
  transform: translateY(-2px); box-shadow: 0 8px 25px rgba(198,40,40,0.35);
  color: white;
}
.btn--outline {
  background: transparent; color: white; border-color: white;
}
.btn--outline:hover {
  background: white; color: var(--brand-navy);
}
.btn--secondary {
  background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-color);
}
.btn--secondary:hover { border-color: var(--brand-red); color: var(--brand-red); }

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--space-20) 0;
}
.section--alt { background: var(--bg-secondary); }
.section__header {
  text-align: center; margin-bottom: var(--space-16); max-width: 700px; margin-left: auto; margin-right: auto;
}
.section__label {
  display: inline-block; font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em; color: var(--brand-red);
  margin-bottom: var(--space-4);
  background: rgba(198,40,40,0.08); padding: var(--space-1) var(--space-4);
  border-radius: var(--border-radius-full);
}
.section__title {
  font-size: var(--text-4xl); font-weight: 700; margin-bottom: var(--space-4);
}
.section__subtitle {
  font-size: var(--text-lg); color: var(--text-secondary); line-height: var(--leading-relaxed);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg); overflow: hidden;
  transition: all var(--transition-base); position: relative;
}
.card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: var(--brand-red);
}
.card__image {
  width: 100%; height: 220px; object-fit: cover;
}
.card__body { padding: var(--space-6); }
.card__tag {
  font-size: var(--text-xs); font-weight: 600; color: var(--brand-red);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-2);
}
.card__title {
  font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--space-3);
}
.card__text {
  font-size: var(--text-sm); color: var(--text-secondary); line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}
.card__link {
  font-size: var(--text-sm); font-weight: 600; color: var(--brand-red);
  display: inline-flex; align-items: center; gap: var(--space-2);
}
.card__link:hover { gap: var(--space-3); }

/* Grid Layouts */
.grid { display: grid; gap: var(--space-8); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Two Column Layout */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center;
}
.two-col--reverse { direction: rtl; }
.two-col--reverse > * { direction: ltr; }

/* ============================================
   CERTIFICATIONS
   ============================================ */
.cert-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg); padding: var(--space-8);
  text-align: center; transition: all var(--transition-base);
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cert-card__icon {
  width: 80px; height: 80px; margin: 0 auto var(--space-6);
  background: var(--bg-secondary); border-radius: var(--border-radius);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-3xl); color: var(--brand-navy);
}
[data-theme="dark"] .cert-card__icon { color: var(--brand-red-light); }
.cert-card__title { font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--space-3); }
.cert-card__text { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--space-6); line-height: var(--leading-relaxed); }

/* ============================================
   CONTACT INFO CARDS
   ============================================ */
.contact-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg); padding: var(--space-6);
  text-align: center; transition: all var(--transition-base);
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-red); }
.contact-card__icon {
  width: 56px; height: 56px; margin: 0 auto var(--space-4);
  background: rgba(198,40,40,0.08); border-radius: var(--border-radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xl); color: var(--brand-red);
}
.contact-card__label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary); margin-bottom: var(--space-2); }
.contact-card__value { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); word-break: break-word; }

/* ============================================
   FORMS
   ============================================ */
.form { display: flex; flex-direction: column; gap: var(--space-5); }
.form__group { display: flex; flex-direction: column; gap: var(--space-2); }
.form__label { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.form__input, .form__textarea, .form__select {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: var(--border-radius); font-family: var(--font-body);
  font-size: var(--text-base); color: var(--text-primary);
  transition: all var(--transition-fast); width: 100%;
}
.form__input:focus, .form__textarea:focus {
  outline: none; border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(198,40,40,0.1);
}
.form__textarea { min-height: 140px; resize: vertical; }
.form__file-label {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-4); background: var(--bg-secondary);
  border: 2px dashed var(--border-color); border-radius: var(--border-radius);
  cursor: pointer; font-size: var(--text-sm); color: var(--text-secondary);
  transition: all var(--transition-fast); text-align: center; justify-content: center;
}
.form__file-label:hover { border-color: var(--brand-red); color: var(--brand-red); }
.form__file-input { display: none; }
.form__status { padding: var(--space-4); border-radius: var(--border-radius); font-size: var(--text-sm); font-weight: 500; display: none; }
.form__status--success { display: block; background: rgba(16,185,129,0.1); color: #059669; border: 1px solid rgba(16,185,129,0.2); }
.form__status--error { display: block; background: rgba(239,68,68,0.1); color: #DC2626; border: 1px solid rgba(239,68,68,0.2); }

/* ============================================
   MAP
   ============================================ */
.map-container {
  border-radius: var(--border-radius-lg); overflow: hidden;
  border: 1px solid var(--border-color); height: 400px;
}
.map-container iframe { width: 100%; height: 100%; border: 0; }

/* ============================================
   COMPLIANCE / TABS
   ============================================ */
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-10); justify-content: center; }
.tab-btn {
  padding: var(--space-3) var(--space-6); border-radius: var(--border-radius-full);
  font-size: var(--text-sm); font-weight: 600; background: var(--bg-secondary);
  border: 1px solid var(--border-color); cursor: pointer; color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.tab-btn:hover, .tab-btn.active { background: var(--brand-navy); color: white; border-color: var(--brand-navy); }

.compliance-section {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg); padding: var(--space-8);
  margin-bottom: var(--space-8);
}
.compliance-section__title { font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--space-4); }
.compliance-section__text { color: var(--text-secondary); line-height: var(--leading-relaxed); margin-bottom: var(--space-6); }

/* ============================================
   TIMELINE
   ============================================ */
.timeline { position: relative; padding-left: var(--space-10); }
.timeline::before {
  content: ''; position: absolute; left: 16px; top: 0; bottom: 0;
  width: 2px; background: var(--border-color);
}
.timeline__item { position: relative; margin-bottom: var(--space-8); }
.timeline__dot {
  position: absolute; left: calc(-1 * var(--space-10) + 8px); top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-red); border: 3px solid var(--bg-primary);
}
.timeline__year { font-size: var(--text-sm); font-weight: 700; color: var(--brand-red); margin-bottom: var(--space-1); }
.timeline__text { font-size: var(--text-sm); color: var(--text-secondary); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-footer); color: var(--text-on-footer);
  padding: var(--space-16) 0 var(--space-8);
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-10); margin-bottom: var(--space-12); }
.footer__brand p { font-size: var(--text-sm); line-height: var(--leading-relaxed); margin-top: var(--space-4); color: var(--text-on-footer); }
.footer__logo { height: 35px; filter: brightness(0) invert(1); margin-bottom: var(--space-2); }
.footer__title { font-size: var(--text-sm); font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-4); }
.footer__links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer__link { font-size: var(--text-sm); color: var(--text-on-footer); transition: color var(--transition-fast); }
.footer__link:hover { color: white; }
.footer__certs { display: flex; gap: var(--space-4); align-items: center; margin-top: var(--space-6); flex-wrap: wrap; }
.footer__certs img { height: 40px; opacity: 0.7; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--space-6);
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--text-xs); color: var(--text-on-footer);
}


/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 70px; }
  .hamburger { display: flex; }
  .header__nav {
    position: fixed; top: var(--header-height); left: 0; right: 0; bottom: 0;
    background: var(--bg-primary); flex-direction: column; padding: var(--space-8);
    transform: translateX(100%); transition: transform var(--transition-base);
    border-top: 1px solid var(--border-color); z-index: 999;
  }
  .header__nav.open { transform: translateX(0); }
  .nav__list { flex-direction: column; gap: var(--space-4); width: 100%; }
  .nav__link { font-size: var(--text-lg); padding: var(--space-3) 0; }
  .hero__title { font-size: var(--text-3xl); }
  .hero__subtitle { font-size: var(--text-base); }
  .hero { min-height: 70vh; }
  .hero--small { min-height: 35vh; }
  .two-col { grid-template-columns: 1fr; gap: var(--space-8); }
  .two-col--reverse { direction: ltr; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .section { padding: var(--space-12) 0; }
  .section__title { font-size: var(--text-3xl); }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; gap: var(--space-3); }
  .tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: var(--space-2); }
}
