/* Base/Common Styles - GastroHub */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #333333;
  --accent: #2563eb;
  --success: #10b981;
  --danger: #ef4444;

  --bg-main: #f5f5f5;
  --bg-white: #ffffff;
  --bg-light: #fdfdfd;
  --bg-alt: #f8fafc;
  --border: #e0e0e0;
  --border-light: #f0f0f0;

  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #9ca3af;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-premium: 0 4px 20px rgba(0, 0, 0, 0.05);

  --radius: 4px;
  --radius-lg: 8px;

  --form-bg: #fdfdfd;
  --select-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-white: #1e293b;
  --bg-light: #1e293b;
  --bg-alt: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-light: #94a3b8;
  --border: #334155;
  --border-light: #334155;
  --secondary: #334155;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-premium: 0 4px 20px rgba(0, 0, 0, 0.3);
  --form-bg: #0f172a;
  --select-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23cbd5e1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

.container-medium {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-top {
  background: var(--bg-white);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.header-top-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.header-logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .header-top-content {
    flex-wrap: wrap;
    gap: 10px;
  }
  .header-search {
    flex: 0 0 100%;
    order: 3;
    margin-top: 5px;
  }
  .header-logo {
    font-size: 22px;
  }
  .header-actions {
    gap: 8px;
  }
}

.header-search {
  display: flex;
  gap: 0;
  flex: 1;
  max-width: 600px;
}

.header-search input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}

.header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: scale(1.02);
}

.header-search button {
  padding: 12px 30px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.header-search button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.header-search button:hover::before {
  width: 300px;
  height: 300px;
}

.header-search button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.header-search button:active {
  transform: scale(0.98);
}

.header-search button i {
  transition: transform 0.3s ease;
}

.header-search button:hover i {
  transform: scale(1.2);
}

/* Navigation */
.nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-item {
  white-space: nowrap;
}

.nav-link {
  display: block;
  padding: 15px 20px;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  transform: translateY(-2px);
}

.nav-link i {
  transition: transform 0.3s ease;
}

.nav-link:hover i {
  transform: scale(1.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-toggle i {
  color: #eab308;
  transition: transform 0.3s ease;
}

#theme-toggle:hover i {
  transform: rotate(30deg) scale(1.2);
}

/* Premium Form Design System */
.form-card {
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-premium);
  margin-bottom: 24px;
}

.form-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--form-bg);
  color: var(--text-primary);
  transition: all 0.2s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  background: var(--bg-white);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: var(--text-light);
  opacity: 0.6;
}

.form-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 5px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Custom Select bombs */
select.form-control {
  appearance: none;
  background-image: var(--select-icon);
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 18px;
  padding-right: 45px;
}

.mobile-only {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-only {
    display: inline-flex !important;
  }
  .desktop-only {
    display: none !important;
  }
}

/* Footer */
.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 40px 0 20px;
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-section a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.footer-section a i {
  transition: transform 0.3s ease;
}

.footer-section a:hover i {
  transform: scale(1.2);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  color: var(--text-light);
  font-size: 12px;
}
