
  :root {
    --green-deep: #1a3a1a;
    --green-mid: #2d6a2d;
    --green-light: #4a9e4a;
    --gold: #c8a84b;
    --gold-light: #e8c87a;
    --cream: #faf6ee;
    --dark: #0f1f0f;
    --text-dark: #1a2a1a;
    --text-mid: #3a5a3a;
    --purple-grape: #6b2d8b;
    --purple-light: #9b5db8;
    --red-grape: #8b1a2d;
    --white: #ffffff;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  body {
    font-family: 'Tajawal', sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    overflow-x: hidden;
  }

  /* ===== NAVBAR ===== */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(15, 31, 15, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(200, 168, 75, 0.25);
    padding: 0 4rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
  }

  nav.scrolled {
    background: rgba(15, 31, 15, 0.98);
    height: 60px;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
  }

  .logo-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
  }

  .logo-text {
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Amiri', serif;
    line-height: 1.1;
  }

  .logo-sub {
    color: var(--gold);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 2px;
    display: block;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
  }

  .nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
  }

  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.3s;
  }

  .nav-links a:hover { color: var(--gold); }
  .nav-links a:hover::after { transform: scaleX(1); }

  .nav-cta {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--dark) !important;
    padding: 0.5rem 1.4rem;
    border-radius: 25px;
    font-weight: 700 !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
  }

  .nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200,168,75,0.4);
  }

  .nav-cta::after { display: none !important; }

  /* ===== HERO ===== */
  .hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    overflow: hidden;
  }

  .hero-bg {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1474979266404-7eaacbcd87c5?w=1920&h=1080&fit=crop&q=90') #1a3a1a center/cover no-repeat;
    transform: scale(1.05);
    animation: heroZoom 12s ease-in-out infinite alternate;
  }

  @keyframes heroZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.12); }
  }

  .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      135deg,
      rgba(10,25,10,0.85) 0%,
      rgba(26,58,26,0.7) 40%,
      rgba(107,45,139,0.4) 100%
    );
  }

  .hero-content {
    position: relative;
    z-index: 2;
    padding: 0 6rem;
    max-width: 750px;
    animation: fadeInUp 1s ease 0.3s both;
  }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(200,168,75,0.2);
    border: 1px solid rgba(200,168,75,0.5);
    color: var(--gold-light);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
  }

  .hero h1 {
    font-family: 'Amiri', serif;
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  }

  .hero h1 span {
    color: var(--gold-light);
  }

  .hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 550px;
  }

  .hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--dark);
    padding: 1rem 2.2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    text-decoration: none;
  }

  .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(200,168,75,0.5);
  }

  .btn-secondary {
    background: transparent;
    color: var(--white);
    padding: 1rem 2.2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    text-decoration: none;
  }

  .btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-3px);
  }

  .hero-stats {
    position: absolute;
    bottom: 3rem;
    left: 6rem;
    right: 6rem;
    display: flex;
    gap: 2rem;
    z-index: 2;
    animation: fadeInUp 1s ease 0.7s both;
  }

  .stat-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 1rem 1.8rem;
    text-align: center;
    color: white;
    flex: 1;
  }

  .stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold-light);
    display: block;
    font-family: 'Amiri', serif;
  }

  .stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
  }

  .scroll-indicator {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: bounce 2s infinite;
    z-index: 2;
  }

  @keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
  }

  /* ===== AI SECTION ===== */
  .ai-section {
    background: linear-gradient(135deg, var(--green-deep) 0%, var(--dark) 60%, var(--purple-grape) 100%);
    padding: 6rem 6rem;
    position: relative;
    overflow: hidden;
  }

  .ai-section::before {
    content: '';
    position: absolute;
    top: -100px; left: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(107,45,139,0.3) 0%, transparent 70%);
    border-radius: 50%;
  }

  .ai-section::after {
    content: '';
    position: absolute;
    bottom: -80px; right: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(74,158,74,0.2) 0%, transparent 70%);
    border-radius: 50%;
  }

  .section-header {
    text-align: center;
    margin-bottom: 3rem;
  }

  .section-badge {
    display: inline-block;
    background: rgba(200,168,75,0.2);
    border: 1px solid rgba(200,168,75,0.4);
    color: var(--gold);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 1px;
  }

  .section-title {
    font-family: 'Amiri', serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.8rem;
    line-height: 1.3;
  }

  .section-title span { color: var(--gold-light); }

  .section-desc {
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
  }

  .ai-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }

  .ai-left .section-header { text-align: right; }
  .ai-left .section-desc { margin: 0; }

  .ai-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
  }

  .ai-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
  }

  .ai-feature i {
    width: 32px; height: 32px;
    background: rgba(200,168,75,0.2);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  .upload-box {
    background: rgba(255,255,255,0.06);
    border: 2px dashed rgba(200,168,75,0.5);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
  }

  .upload-box:hover {
    border-color: var(--gold);
    background: rgba(200,168,75,0.08);
    transform: translateY(-4px);
  }

  .upload-box.dragover {
    border-color: var(--gold-light);
    background: rgba(200,168,75,0.15);
  }

  .upload-icon-wrap {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    color: var(--dark);
    margin: 0 auto 1.5rem;
    animation: pulse 3s ease infinite;
  }

  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200,168,75,0.5); }
    50% { box-shadow: 0 0 0 20px rgba(200,168,75,0); }
  }

  .upload-box h3 {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
  }

  .upload-box p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  #fileInput { display: none; }

  .upload-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--dark);
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
  }

  .upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(200,168,75,0.5);
  }

  .preview-area {
    display: none;
    margin-top: 1.5rem;
  }

  .preview-area img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(200,168,75,0.4);
  }

  .result-box {
    display: none;
    margin-top: 1rem;
    background: rgba(74,158,74,0.15);
    border: 1px solid rgba(74,158,74,0.4);
    border-radius: 12px;
    padding: 1rem;
    text-align: right;
  }

  .result-box h4 { color: var(--green-light); font-size: 1rem; margin-bottom: 0.4rem; }
  .result-box p { color: rgba(255,255,255,0.7); font-size: 0.85rem; }

  /* ===== GRAPE TYPES ===== */
  .grapes-section {
    padding: 6rem 6rem;
    background: var(--cream);
  }

  .grapes-section .section-title { color: var(--text-dark); }
  .grapes-section .section-badge { color: var(--green-mid); border-color: rgba(45,106,45,0.4); background: rgba(45,106,45,0.08); }
  .grapes-section .section-desc { color: var(--text-mid); }

  .grapes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
  }

  .grape-card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s;
    aspect-ratio: 3/4;
    background: var(--green-deep);
  }

  .grape-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  }

  .grape-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }

  .grape-card:hover img { transform: scale(1.08); }

  .grape-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,25,10,0.95) 0%, rgba(10,25,10,0.3) 50%, transparent 100%);
  }

  .grape-card-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1.5rem;
  }

  .grape-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
  }

  .badge-red { background: rgba(139,26,45,0.7); color: #ffb3bf; }
  .badge-green { background: rgba(45,106,45,0.7); color: #b3ffb3; }
  .badge-black { background: rgba(30,15,50,0.8); color: #d4a8ff; }
  .badge-white { background: rgba(200,168,75,0.4); color: #ffe8a0; }

  .grape-card h3 {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Amiri', serif;
    margin-bottom: 0.3rem;
  }

  .grape-card p {
    color: rgba(255,255,255,0.65);
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .grape-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.8rem;
  }

  .grape-meta span {
    color: rgba(255,255,255,0.5);
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .grape-meta i { color: var(--gold); font-size: 0.7rem; }

  .grapes-grid .grape-card:first-child {
    grid-row: span 2;
    aspect-ratio: auto;
  }

  /* ===== FARMS SECTION ===== */
  .farms-section {
    background: linear-gradient(180deg, #f0f5f0 0%, var(--cream) 100%);
    padding: 6rem 6rem;
  }

  .farms-section .section-title { color: var(--text-dark); }
  .farms-section .section-badge { color: var(--green-mid); border-color: rgba(45,106,45,0.4); background: rgba(45,106,45,0.08); }

  .farms-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: start;
    margin-top: 3rem;
  }

  .map-placeholder {
    background: linear-gradient(135deg, #e8f0e8, #d0e4d0);
    border-radius: 24px;
    height: 450px;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(45,106,45,0.2);
  }

  #taif-map {
    width: 100%;
    height: 100%;
    border-radius: 20px;
  }

  .map-overlay-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--green-deep);
  }

  .map-overlay-text i {
    font-size: 3rem;
    color: var(--green-mid);
    margin-bottom: 1rem;
  }

  .map-overlay-text h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
  }

  .map-overlay-text p { font-size: 0.9rem; opacity: 0.7; }

  .map-pin {
    position: absolute;
    width: 36px; height: 36px;
    background: var(--green-mid);
    border: 3px solid white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }

  .map-pin:hover { transform: rotate(-45deg) scale(1.2); }

  .pin1 { top: 30%; left: 35%; background: var(--red-grape); }
  .pin2 { top: 45%; left: 50%; }
  .pin3 { top: 55%; left: 30%; background: var(--purple-grape); }
  .pin4 { top: 25%; left: 55%; background: var(--gold); }

  .farms-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .farm-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: all 0.3s;
    border: 1px solid rgba(45,106,45,0.1);
    cursor: pointer;
  }

  .farm-card:hover {
    transform: translateX(-6px);
    box-shadow: 0 8px 25px rgba(45,106,45,0.15);
    border-color: rgba(45,106,45,0.3);
  }

  .farm-img {
    width: 70px; height: 70px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
  }

  .farm-info { flex: 1; }

  .farm-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
  }

  .farm-info p {
    color: var(--text-mid);
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
  }

  .farm-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
  }

  .farm-tag {
    background: rgba(45,106,45,0.1);
    color: var(--green-mid);
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 600;
  }

  .farm-arrow {
    color: var(--green-mid);
    font-size: 1.1rem;
    opacity: 0.6;
  }

  /* ===== SEASON SECTION ===== */
  .season-section {
    background: var(--dark);
    padding: 6rem 6rem;
    position: relative;
    overflow: hidden;
  }

  .season-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green-mid), var(--gold), var(--purple-grape));
  }

  .season-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
  }

  .season-card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    height: 320px;
    cursor: pointer;
    transition: all 0.4s;
  }

  .season-card:hover { transform: translateY(-6px); }

  .season-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
  }

  .season-card:hover img { transform: scale(1.06); }

  .season-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,25,10,0.92) 0%, transparent 60%);
  }

  .season-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(200,168,75,0.9);
    color: var(--dark);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
  }

  .season-card-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1.5rem;
  }

  .season-card h3 {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Amiri', serif;
    margin-bottom: 0.4rem;
  }

  .season-card p {
    color: rgba(255,255,255,0.65);
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .season-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    font-size: 0.78rem;
    margin-top: 0.6rem;
  }

  /* ===== ARTICLES ===== */
  .articles-section {
    padding: 6rem 6rem;
    background: var(--cream);
  }

  .articles-section .section-title { color: var(--text-dark); }
  .articles-section .section-badge { color: var(--green-mid); border-color: rgba(45,106,45,0.4); background: rgba(45,106,45,0.08); }

  .articles-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
  }

  .see-all {
    color: var(--green-mid);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s;
  }

  .see-all:hover { gap: 10px; }

  .articles-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
  }

  .article-card {
    border-radius: 16px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(45,106,45,0.1);
    transition: all 0.3s;
    cursor: pointer;
  }

  .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(45,106,45,0.12);
  }

  .article-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s;
  }

  .article-card:first-child .article-img { height: 280px; }

  .article-card:hover .article-img { transform: scale(1.04); }

  .article-body { padding: 1.2rem; }

  .article-tag {
    background: rgba(45,106,45,0.1);
    color: var(--green-mid);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 0.6rem;
  }

  .article-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 0.4rem;
  }

  .article-card:first-child .article-body h3 { font-size: 1.2rem; }

  .article-body p {
    color: var(--text-mid);
    font-size: 0.82rem;
    line-height: 1.6;
  }

  .article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(45,106,45,0.1);
  }

  .article-meta span {
    color: var(--text-mid);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .article-meta i { color: var(--green-light); }

  /* ===== CTA ===== */
  .cta-section {
    background: linear-gradient(135deg, var(--green-deep), var(--purple-grape));
    padding: 5rem 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
  }

  .cta-section::before {
    content: '🍇';
    position: absolute;
    font-size: 15rem;
    opacity: 0.04;
    top: -2rem;
    right: -2rem;
    line-height: 1;
  }

  .cta-section h2 {
    font-family: 'Amiri', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--white);
    margin-bottom: 1rem;
  }

  .cta-section p {
    color: rgba(255,255,255,0.75);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  /* ===== FOOTER ===== */
  footer {
    background: #080f08;
    padding: 4rem 6rem 2rem;
    color: rgba(255,255,255,0.6);
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
  }

  .footer-brand .logo { margin-bottom: 1rem; }

  .footer-brand p {
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
  }

  .social-links {
    display: flex;
    gap: 0.8rem;
  }

  .social-links a {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.85rem;
  }

  .social-links a:hover { background: var(--gold); color: var(--dark); }

  .footer-col h4 {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
  }

  .footer-col ul { list-style: none; }

  .footer-col ul li {
    margin-bottom: 0.6rem;
  }

  .footer-col ul li a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
  }

  .footer-col ul li a:hover { color: var(--gold); }

  .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
  }

  /* ===== UTILITIES ===== */
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  @media (max-width: 1024px) {
    nav { padding: 0 2rem; }
    .hero-content { padding: 0 2rem; }
    .hero-stats { left: 2rem; right: 2rem; }
    .ai-section, .grapes-section, .farms-section, .season-section, .articles-section { padding: 4rem 2rem; }
    .grapes-grid { grid-template-columns: repeat(2, 1fr); }
    .grapes-grid .grape-card:first-child { grid-row: 1; }
    .farms-layout { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr 1fr; }
    .articles-grid .article-card:nth-child(1) { grid-column: span 2; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .ai-container { grid-template-columns: 1fr; }
    .season-cards { grid-template-columns: 1fr 1fr; }
  }

  /* ===== HAMBURGER ===== */
  .hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    flex-direction: column;
    gap: 5px;
  }

  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  /* ===== MOBILE ===== */
  @media (max-width: 768px) {
    nav { padding: 0 1.2rem; }

    .hamburger { display: flex; }

    .nav-links {
      position: fixed;
      top: 70px;
      left: 0; right: 0;
      background: rgba(10,20,10,0.97);
      backdrop-filter: blur(20px);
      flex-direction: column;
      gap: 0;
      align-items: stretch;
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.4s ease;
      border-bottom: 1px solid rgba(200,168,75,0.15);
      z-index: 999;
    }

    .nav-links.open { max-height: 420px; }

    .nav-links li { border-bottom: 1px solid rgba(255,255,255,0.06); }

    .nav-links a {
      display: block;
      padding: 1rem 1.5rem;
      font-size: 1rem;
    }

    .nav-links a::after { display: none; }

    .nav-cta {
      margin: 0.75rem 1.2rem 1rem;
      text-align: center;
      border-radius: 10px;
      padding: 0.75rem 1rem !important;
    }

    /* Hero */
    .hero-content { padding: 0 1.2rem; max-width: 100%; }
    .hero p { font-size: 1rem; }

    .hero-buttons { flex-direction: column; }

    .btn-primary, .btn-secondary {
      justify-content: center;
      width: 100%;
    }

    .hero-stats {
      left: 1rem; right: 1rem; bottom: 1rem;
      gap: 0.5rem;
      flex-wrap: wrap;
    }

    .stat-card {
      padding: 0.65rem 0.8rem;
      min-width: calc(50% - 0.25rem);
      flex: 1;
    }

    .stat-num { font-size: 1.3rem; }
    .stat-label { font-size: 0.7rem; }

    /* Sections */
    .ai-section,
    .grapes-section,
    .farms-section,
    .season-section,
    .articles-section,
    .cta-section { padding: 3.5rem 1.2rem; }

    footer { padding: 3rem 1.2rem 1.5rem; }

    /* AI */
    .ai-container { gap: 2rem; }
    .upload-box { padding: 2rem 1.2rem; }

    /* Grapes */
    .grapes-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .grapes-grid .grape-card:first-child {
      grid-column: span 2;
      grid-row: 1;
      aspect-ratio: 16/9;
    }

    /* Farms */
    .farms-layout { grid-template-columns: 1fr; }
    .map-placeholder { height: 260px; }

    /* Season */
    .season-cards { grid-template-columns: 1fr; }
    .season-card { height: 280px; }

    /* Articles */
    .articles-header { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
    .articles-grid { grid-template-columns: 1fr; }
    .articles-grid .article-card:nth-child(1) { grid-column: 1; }
    .article-card:first-child .article-img { height: 200px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  }

/* ============================================================
   DETAIL PAGES (grape-details, farm-details)
   ============================================================ */

/* ===== DETAIL HERO ===== */
.detail-hero {
  position: relative;
  height: 70vh;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-bottom: 3.5rem;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  animation: heroZoom 14s ease-in-out infinite alternate;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 18, 8, 0.95) 0%,
    rgba(15, 31, 15, 0.65) 40%,
    rgba(15, 31, 15, 0.25) 100%
  );
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 6rem;
  animation: fadeInUp 0.8s ease both;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  transition: color 0.3s, gap 0.3s;
}

.back-btn:hover { color: var(--gold); gap: 12px; }

.detail-hero-content h1 {
  font-family: 'Amiri', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--white);
  font-weight: 700;
  line-height: 1.2;
  margin: 0.6rem 0 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.detail-hero-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.detail-hero-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}

.detail-hero-meta i { color: var(--gold); }

/* ===== SHARED DETAIL BODY ===== */
.detail-body {
  padding: 4rem 6rem;
  background: var(--cream);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

.detail-block {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 1.8rem;
  border: 1px solid rgba(45,106,45,0.1);
}

.block-title {
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.block-title i { color: var(--green-mid); font-size: 1.1rem; }

.detail-desc {
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.9;
}

/* ===== SIDEBAR ===== */
.detail-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.sidebar-card {
  background: var(--white);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid rgba(45,106,45,0.1);
}

.sidebar-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
}

.sidebar-card p {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.7;
}

.ai-prompt-card {
  background: linear-gradient(135deg, var(--green-deep), var(--dark));
  border: none;
  text-align: center;
}

.ai-prompt-card h3 { color: var(--white); }
.ai-prompt-card p  { color: rgba(255,255,255,0.65); }

.sidebar-card-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: var(--dark);
  margin: 0 auto 1rem;
}

/* ===== SHARED SECTION HEADER ===== */
.detail-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.detail-section-header h2 {
  font-family: 'Amiri', serif;
  font-size: 1.6rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-section-header h2 i { color: var(--green-mid); }

/* ===== CHARACTERISTICS GRID (grape detail) ===== */
.chars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.char-card {
  background: linear-gradient(135deg, #f5faf5, #eef6ee);
  border: 1px solid rgba(45,106,45,0.12);
  border-radius: 14px;
  padding: 1.2rem 1rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.char-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(45,106,45,0.12);
}

.char-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem;
  color: white;
  font-size: 1rem;
}

.char-label {
  display: block;
  color: var(--text-mid);
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
}

.char-value {
  display: block;
  color: var(--text-dark);
  font-size: 0.95rem;
  font-weight: 700;
}

/* ===== GALLERY ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.4s, box-shadow 0.4s;
}

.gallery-grid img:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.gallery-grid img:first-child {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

/* ===== FARMS GRID (grape detail) ===== */
.detail-farms-section {
  padding: 3rem 6rem 4rem;
  background: linear-gradient(180deg, #f0f5f0 0%, var(--cream) 100%);
}

.detail-farms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.detail-farm-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(45,106,45,0.1);
  transition: all 0.3s;
  cursor: pointer;
}

.detail-farm-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(45,106,45,0.15);
  border-color: rgba(45,106,45,0.25);
}

.detail-farm-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.4s;
}

.detail-farm-card:hover img { transform: scale(1.05); }

.detail-farm-info {
  padding: 1rem 1.2rem;
}

.detail-farm-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.detail-farm-info p {
  color: var(--text-mid);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.detail-farm-info p i { color: var(--green-mid); }

/* ===== OTHER GRAPES (grape detail) ===== */
.other-grapes-section {
  padding: 3rem 6rem 5rem;
  background: var(--cream);
}

.other-grapes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-top: 0.5rem;
}

.other-grape-card {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3/4;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s, box-shadow 0.4s;
  background: var(--green-deep);
  display: block;
  text-decoration: none;
}

.other-grape-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.2);
}

.other-grape-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.other-grape-card:hover img { transform: scale(1.08); }

.other-grape-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,25,10,0.92) 0%, transparent 55%);
}

.other-grape-card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.2rem;
}

.other-grape-card h4 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Amiri', serif;
  margin-bottom: 0.25rem;
}

.other-grape-card p {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem; left: 1.5rem;
  background: rgba(255,255,255,0.12);
  border: none;
  color: white;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* ===== FARM DETAIL — INFO GRID ===== */
.farm-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.farm-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 1rem;
  background: linear-gradient(135deg, #f5faf5, #eef6ee);
  border: 1px solid rgba(45,106,45,0.12);
  border-radius: 14px;
}

.farm-info-item .fi-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.farm-info-item .fi-text label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-mid);
  margin-bottom: 3px;
}

.farm-info-item .fi-text strong {
  font-size: 0.92rem;
  color: var(--text-dark);
  font-weight: 700;
}

/* ===== FARM DETAIL — GRAPE TAGS ===== */
.grape-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.grape-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(45,106,45,0.08);
  border: 1px solid rgba(45,106,45,0.2);
  color: var(--green-mid);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.25s;
}

.grape-tag-pill:hover {
  background: var(--green-mid);
  color: white;
  border-color: var(--green-mid);
}

/* ===== FARM DETAIL — MAP ===== */
.farm-map-section {
  padding: 3rem 6rem 4rem;
  background: linear-gradient(180deg, #f0f5f0 0%, var(--cream) 100%);
}

.farm-map-wrap {
  border-radius: 20px;
  overflow: hidden;
  height: 380px;
  border: 2px solid rgba(45,106,45,0.15);
}

#farm-map {
  width: 100%;
  height: 100%;
}

/* ===== FARM DETAIL — AVAILABLE GRAPES SECTION ===== */
.farm-grapes-section {
  padding: 3rem 6rem 5rem;
  background: var(--cream);
}

.farm-grapes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 0.5rem;
}

/* ===== RESPONSIVE — DETAIL PAGES ===== */
@media (max-width: 1024px) {
  .detail-hero-content { padding: 0 2rem; }
  .detail-body { padding: 3rem 2rem; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .detail-farms-section,
  .other-grapes-section,
  .farm-map-section,
  .farm-grapes-section { padding: 3rem 2rem; }
  .chars-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-farms-grid { grid-template-columns: repeat(2, 1fr); }
  .other-grapes-grid { grid-template-columns: repeat(2, 1fr); }
  .farm-grapes-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .detail-hero { height: 60vh; min-height: 380px; padding-bottom: 2.5rem; }
  .detail-hero-content { padding: 0 1.2rem; }
  .detail-body { padding: 2rem 1.2rem; }
  .detail-farms-section,
  .other-grapes-section,
  .farm-map-section,
  .farm-grapes-section { padding: 2.5rem 1.2rem; }
  .chars-grid { grid-template-columns: repeat(2, 1fr); }
  .farm-info-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid img:first-child { grid-column: span 2; }
  .detail-farms-grid { grid-template-columns: 1fr; }
  .other-grapes-grid { grid-template-columns: repeat(2, 1fr); }
  .farm-grapes-grid { grid-template-columns: 1fr; }
  .detail-section-header { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
  .farm-map-wrap { height: 260px; }
}

/* ============================================================
   ARTICLES PAGE
   ============================================================ */

/* ===== PAGE HERO ===== */
.articles-hero {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--dark) 60%, var(--purple-grape) 100%);
  padding: 8rem 6rem 4rem;
  position: relative;
  overflow: hidden;
}

.articles-hero::before {
  content: '';
  position: absolute;
  top: -80px; left: -80px;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(200,168,75,0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.articles-hero-content { position: relative; z-index: 1; }

.articles-hero h1 {
  font-family: 'Amiri', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--white);
  font-weight: 700;
  margin: 0.8rem 0 0.6rem;
}

.articles-hero h1 span { color: var(--gold-light); }

.articles-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  max-width: 480px;
  line-height: 1.7;
}

/* ===== CATEGORIES BAR ===== */
.categories-bar {
  background: var(--white);
  border-bottom: 1px solid rgba(45,106,45,0.1);
  padding: 0 6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.categories-bar::-webkit-scrollbar { display: none; }

.cat-btn {
  flex-shrink: 0;
  padding: 1rem 1.4rem;
  border: none;
  background: transparent;
  color: var(--text-mid);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.25s;
  white-space: nowrap;
}

.cat-btn:hover { color: var(--green-mid); }
.cat-btn.active { color: var(--green-mid); border-bottom-color: var(--green-mid); }

/* ===== FEATURED ARTICLE ===== */
.featured-section {
  padding: 4rem 6rem 2rem;
  background: var(--cream);
}

.featured-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(45,106,45,0.1);
  align-items: center;
}

.featured-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--dark);
}

.featured-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.featured-article:hover .featured-media img { transform: scale(1.05); }

/* video embed — shown instead of img when article has video */
.video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: #000;
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.featured-body {
  padding: 2.5rem 2.5rem 2.5rem 0;
}

.featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(45,106,45,0.08);
  border: 1px solid rgba(45,106,45,0.2);
  color: var(--green-mid);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.featured-label {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  margin-bottom: 1rem;
  margin-right: 0.5rem;
}

.has-video-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(107,45,139,0.1);
  border: 1px solid rgba(107,45,139,0.25);
  color: var(--purple-grape);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.featured-body h2 {
  font-family: 'Amiri', serif;
  font-size: 1.7rem;
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.8rem;
}

.featured-body p {
  color: var(--text-mid);
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.8rem;
  color: var(--text-mid);
  padding-top: 1rem;
  border-top: 1px solid rgba(45,106,45,0.1);
}

.featured-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.featured-meta i { color: var(--green-light); }

/* ===== ARTICLES GRID ===== */
.articles-page-section {
  padding: 3rem 6rem 5rem;
  background: var(--cream);
}

.articles-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.article-page-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(45,106,45,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.article-page-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(45,106,45,0.12);
}

.article-page-card .card-media {
  position: relative;
  overflow: hidden;
}

.article-page-card .card-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s;
  display: block;
}

.article-page-card:hover .card-media img { transform: scale(1.05); }

.video-play-indicator {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
}

.video-play-indicator i {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--purple-grape);
  transition: transform 0.3s;
}

.article-page-card:hover .video-play-indicator i { transform: scale(1.1); }

.article-page-card .card-body {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}

.card-tag {
  background: rgba(45,106,45,0.08);
  color: var(--green-mid);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
}

.card-tag.video { background: rgba(107,45,139,0.08); color: var(--purple-grape); }

.article-page-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

.article-page-card p {
  color: var(--text-mid);
  font-size: 0.82rem;
  line-height: 1.65;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(45,106,45,0.08);
  font-size: 0.75rem;
  color: var(--text-mid);
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-meta i { color: var(--green-light); }

/* ===== RESPONSIVE — ARTICLES PAGE ===== */
@media (max-width: 1024px) {
  .articles-hero { padding: 7rem 2rem 3rem; }
  .categories-bar { padding: 0 2rem; }
  .featured-section { padding: 3rem 2rem 2rem; }
  .featured-article { grid-template-columns: 1fr; }
  .featured-body { padding: 1.5rem; }
  .articles-page-section { padding: 2rem 2rem 4rem; }
  .articles-page-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .articles-hero { padding: 6rem 1.2rem 2.5rem; }
  .categories-bar { padding: 0 1.2rem; }
  .featured-section { padding: 2rem 1.2rem 1rem; }
  .articles-page-section { padding: 2rem 1.2rem 3rem; }
  .articles-page-grid { grid-template-columns: 1fr; }
  .featured-body h2 { font-size: 1.3rem; }
}

/* ============================================================
   ARTICLE DETAIL PAGE
   ============================================================ */

/* ===== ARTICLE HERO ===== */
.article-hero {
  position: relative;
  height: 55vh;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-bottom: 3rem;
}

.article-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: heroZoom 14s ease-in-out infinite alternate;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8,18,8,0.97) 0%,
    rgba(15,31,15,0.7) 45%,
    rgba(15,31,15,0.2) 100%
  );
}

.article-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 6rem;
  max-width: 860px;
  animation: fadeInUp 0.8s ease both;
}

.article-hero-content h1 {
  font-family: 'Amiri', serif;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  color: var(--white);
  font-weight: 700;
  line-height: 1.35;
  margin: 0.8rem 0 1.2rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
}

.article-byline span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
}

.article-byline i { color: var(--gold); }

/* ===== ARTICLE BODY LAYOUT ===== */
.article-page-body {
  padding: 4rem 6rem;
  background: var(--cream);
}

.article-page-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

/* ===== ARTICLE CONTENT ===== */
.article-content {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid rgba(45,106,45,0.1);
}

.article-lead {
  font-size: 1.12rem;
  color: var(--text-dark);
  line-height: 1.9;
  font-weight: 500;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid rgba(45,106,45,0.1);
}

.article-content h2 {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  color: var(--text-dark);
  font-weight: 700;
  margin: 2rem 0 1rem;
  padding-right: 1rem;
  border-right: 4px solid var(--green-mid);
}

.article-content h3 {
  font-family: 'Amiri', serif;
  font-size: 1.2rem;
  color: var(--text-dark);
  font-weight: 700;
  margin: 1.5rem 0 0.8rem;
}

.article-content p {
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.95;
  margin-bottom: 1.2rem;
}

/* inline image — full width */
.article-inline-img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
  margin: 1.5rem 0;
  display: block;
  max-height: 420px;
}

/* caption under images */
.img-caption {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-mid);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* side-by-side images */
.article-img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.article-img-pair img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
}

/* inline video — optional, sits between paragraphs */
.article-video-block {
  margin: 2rem 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(45,106,45,0.12);
}

.article-video-block .video-label {
  background: linear-gradient(135deg, var(--green-deep), var(--dark));
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ============================================================
   MAP PAGE
   ============================================================ */

.map-page-wrapper {
  display: flex;
  height: calc(100vh - 70px);
  margin-top: 70px;
  overflow: hidden;
}

.map-page-map-container {
  flex: 1;
  position: relative;
}

#map-page {
  width: 100%;
  height: 100%;
}

.map-page-sidebar {
  width: 360px;
  flex-shrink: 0;
  background: var(--cream);
  border-right: 1px solid rgba(45,106,45,0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-sidebar-header {
  padding: 1.2rem 1.4rem 0.8rem;
  border-bottom: 1px solid rgba(45,106,45,0.1);
  background: var(--white);
  flex-shrink: 0;
}

.map-sidebar-header h2 {
  font-family: 'Amiri', serif;
  font-size: 1.2rem;
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.map-filter-strip {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.map-filter-chip {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(45,106,45,0.25);
  background: transparent;
  color: var(--text-mid);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.map-filter-chip:hover { border-color: var(--green-mid); color: var(--green-mid); }
.map-filter-chip.active { background: var(--green-mid); color: white; border-color: var(--green-mid); }

.map-farms-list {
  overflow-y: auto;
  flex: 1;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.map-farm-item {
  background: var(--white);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.map-farm-item:hover {
  border-color: rgba(45,106,45,0.25);
  box-shadow: 0 4px 16px rgba(45,106,45,0.1);
}

.map-farm-item.active {
  border-color: var(--green-mid);
  box-shadow: 0 4px 20px rgba(45,106,45,0.18);
}

.map-farm-img {
  width: 58px; height: 58px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.map-farm-info { flex: 1; min-width: 0; }

.map-farm-info h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-farm-info p {
  color: var(--text-mid);
  font-size: 0.75rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.map-farm-info p i { color: var(--green-mid); font-size: 0.7rem; }

.map-farm-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.map-farm-tag {
  background: rgba(45,106,45,0.08);
  color: var(--green-mid);
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
}

.map-farm-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green-mid);
  text-decoration: none;
  margin-top: 0.4rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.map-farm-link:hover { opacity: 1; }

@media (max-width: 768px) {
  .map-page-wrapper { flex-direction: column; height: auto; }
  .map-page-map-container { height: 55vw; min-height: 280px; }
  .map-page-sidebar { width: 100%; height: auto; max-height: 50vh; }
}

/* ============================================================
   AI PAGE
   ============================================================ */

.ai-page-hero {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--dark) 55%, var(--purple-grape) 100%);
  padding: 8rem 6rem 5rem;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.ai-page-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(107,45,139,0.3) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.ai-page-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(74,158,74,0.2) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.ai-page-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.ai-page-left .section-title { text-align: right; }
.ai-page-left .section-desc { margin: 0; text-align: right; }

.ai-feature-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.ai-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
}

.ai-feature-item .fi {
  width: 36px; height: 36px;
  background: rgba(200,168,75,0.15);
  border: 1px solid rgba(200,168,75,0.3);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* upload zone — ai page */
.ai-upload-zone {
  background: rgba(255,255,255,0.05);
  border: 2px dashed rgba(200,168,75,0.45);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.ai-upload-zone:hover,
.ai-upload-zone.dragover {
  border-color: var(--gold);
  background: rgba(200,168,75,0.08);
  transform: translateY(-3px);
}

.ai-upload-zone h3 {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.ai-upload-zone p {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  margin-bottom: 1.4rem;
}

/* analyzing state */
.ai-analyzing {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.ai-analyzing.show { display: flex; }

.analyze-ring {
  width: 64px; height: 64px;
  border: 4px solid rgba(200,168,75,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.ai-analyzing p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin: 0;
}

/* result card */
.ai-result-card {
  display: none;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(200,168,75,0.3);
  border-radius: 16px;
  overflow: hidden;
  text-align: right;
  margin-top: 1rem;
  animation: fadeInUp 0.5s ease both;
}

.ai-result-card.show { display: block; }

.ai-result-header {
  background: linear-gradient(135deg, rgba(45,106,45,0.4), rgba(74,158,74,0.2));
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-result-header span {
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-result-header span i { color: var(--green-light); }

.confidence-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.confidence-bar {
  width: 80px; height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-light), var(--gold));
  border-radius: 3px;
  width: 94%;
}

.confidence-pct {
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 700;
}

.ai-result-body {
  padding: 1rem 1.2rem;
}

.ai-result-body h4 {
  font-family: 'Amiri', serif;
  font-size: 1.2rem;
  color: var(--white);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.ai-result-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.ai-chip {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 10px;
}

.ai-result-body a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s;
}

.ai-result-body a:hover { gap: 10px; }

/* how it works */
.ai-steps-section {
  padding: 5rem 6rem;
  background: var(--cream);
}

.ai-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.ai-step-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(45,106,45,0.1);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.ai-step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(45,106,45,0.12);
}

.step-num {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
  margin: 0 auto 1.2rem;
  font-family: 'Amiri', serif;
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.ai-step-card h3 {
  font-family: 'Amiri', serif;
  font-size: 1.15rem;
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.ai-step-card p {
  color: var(--text-mid);
  font-size: 0.88rem;
  line-height: 1.7;
}

@media (max-width: 1024px) {
  .ai-page-hero { padding: 7rem 2rem 4rem; }
  .ai-page-inner { grid-template-columns: 1fr; gap: 3rem; }
  .ai-steps-section { padding: 4rem 2rem; }
  .ai-steps-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}

@media (max-width: 768px) {
  .ai-page-hero { padding: 6rem 1.2rem 3rem; min-height: auto; }
  .ai-steps-section { padding: 3rem 1.2rem; }
}

.article-video-block .video-label i { font-size: 0.9rem; }

.article-video-block .video-embed-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
}

.article-video-block .video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* pull quote */
.article-quote {
  border-right: 4px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(200,168,75,0.06);
  border-radius: 0 12px 12px 0;
}

.article-quote p {
  font-family: 'Amiri', serif;
  font-size: 1.2rem;
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.6;
  margin: 0;
}

/* tags at bottom */
.article-footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(45,106,45,0.1);
}

.article-footer-tags a {
  background: rgba(45,106,45,0.08);
  border: 1px solid rgba(45,106,45,0.18);
  color: var(--green-mid);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.25s;
}

.article-footer-tags a:hover { background: var(--green-mid); color: white; }

/* ===== ARTICLE SIDEBAR ===== */
.article-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.article-sidebar .sidebar-card h3 {
  font-size: 0.95rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.toc-list li a {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 0.83rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
  transition: color 0.25s;
}

.toc-list li a::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--green-mid);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.toc-list li a:hover { color: var(--green-mid); }

.share-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.share-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.55rem 0.5rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  border: 1px solid transparent;
}

.share-btn.twitter { background: rgba(29,161,242,0.1); color: #1da1f2; border-color: rgba(29,161,242,0.2); }
.share-btn.whatsapp { background: rgba(37,211,102,0.1); color: #25d366; border-color: rgba(37,211,102,0.2); }
.share-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }

/* ===== RELATED ARTICLES ===== */
.related-section {
  padding: 3rem 6rem 5rem;
  background: linear-gradient(180deg, #f0f5f0 0%, var(--cream) 100%);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

/* ===== RESPONSIVE — ARTICLE DETAIL ===== */
@media (max-width: 1024px) {
  .article-hero-content { padding: 0 2rem; }
  .article-page-body { padding: 3rem 2rem; }
  .article-page-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .related-section { padding: 3rem 2rem 4rem; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .article-hero { height: 50vh; min-height: 340px; padding-bottom: 2rem; }
  .article-hero-content { padding: 0 1.2rem; }
  .article-page-body { padding: 2rem 1.2rem; }
  .article-content { padding: 1.5rem; }
  .related-section { padding: 2.5rem 1.2rem 3rem; }
  .related-grid { grid-template-columns: 1fr; }
  .article-img-pair { grid-template-columns: 1fr; }
}

a.farm-card,
a.article-card,
a.article-page-card,
a.detail-farm-card,
a.grape-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ===== AUTH PAGES ===== */

.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding-top: 70px;
}

.auth-brand-panel {
  background: linear-gradient(160deg, var(--green-deep) 0%, #0d1f0d 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 70%, rgba(200,168,75,0.1) 0%, transparent 60%);
}

.auth-brand-logo {
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
}

.auth-brand-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.2rem;
  box-shadow: 0 8px 24px rgba(200,168,75,0.3);
}

.auth-brand-name {
  color: var(--white);
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Amiri', serif;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.auth-brand-sub {
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 3px;
  font-weight: 400;
  display: block;
}

.auth-brand-tagline {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 300px;
  margin-top: 2rem;
}

.auth-brand-decoration {
  position: relative;
  z-index: 1;
  font-size: 7rem;
  opacity: 0.1;
  margin-top: 2rem;
  line-height: 1;
}

.auth-form-panel {
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  overflow-y: auto;
}

.auth-form-card {
  background: var(--white);
  border-radius: 24px;
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 40px rgba(26,42,26,0.08);
  border: 1px solid rgba(45,106,45,0.1);
}

.auth-form-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
  font-family: 'Tajawal', sans-serif;
}

.auth-subtitle {
  color: var(--text-mid);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.auth-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.auth-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid rgba(45,106,45,0.2);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: 'Tajawal', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}

.auth-input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45,106,45,0.1);
}

.auth-field {
  margin-bottom: 1.2rem;
}

.auth-field-error {
  color: #c0392b;
  font-size: 0.82rem;
  margin-top: 0.35rem;
  display: block;
}

.auth-error {
  background: rgba(192,57,43,0.07);
  border: 1.5px solid rgba(192,57,43,0.3);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  color: #c0392b;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-submit {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 0.5rem;
}

.auth-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.auth-crosslink {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-mid);
  font-size: 0.92rem;
}

.auth-crosslink a {
  color: var(--green-mid);
  font-weight: 600;
  text-decoration: none;
}

.language-toggle {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(200,168,75,0.5);
  padding: 0.45rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Tajawal', sans-serif;
  transition: all 0.2s;
}

.language-toggle:hover {
  background: rgba(200,168,75,0.15);
  border-color: var(--gold);
  color: var(--gold);
}

@media (max-width: 767px) {
  .auth-split {
    grid-template-columns: 1fr;
    padding-top: 60px;
  }
  .auth-brand-panel {
    padding: 2.5rem 1.5rem;
    min-height: 200px;
  }
  .auth-brand-tagline { display: none; }
  .auth-brand-decoration { display: none; }
  .auth-form-panel { padding: 2rem 1rem; align-items: flex-start; }
  .auth-form-card { padding: 1.8rem 1.2rem; }
}

/* ===== AUTHENTICATED PAGES ===== */

/* Logout button in navbar */
.nav-logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Tajawal', sans-serif;
  padding: 0;
  transition: color 0.3s;
}
.nav-logout-btn:hover { color: var(--gold); }
.nav-links li form { display: flex; }

/* Page wrapper */
.dash-page {
  background: var(--cream);
  min-height: 100vh;
  padding-top: 70px;
}

/* Compact hero header */
.page-hero {
  background: linear-gradient(135deg, var(--green-deep) 0%, #0d250d 100%);
  padding: 3.5rem 6rem 3rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(200,168,75,0.12) 0%, transparent 60%);
}
.page-hero-title {
  font-family: 'Amiri', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}
.page-hero-sub {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  position: relative;
  z-index: 1;
  margin: 0;
}

/* Content container */
.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

/* Section card */
.page-section {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(45,106,45,0.1);
  box-shadow: 0 4px 20px rgba(26,42,26,0.06);
  margin-bottom: 1.5rem;
}
.page-section-title {
  font-family: 'Amiri', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(45,106,45,0.12);
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-section-title::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Info rows */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(45,106,45,0.07);
}
.info-row:last-child { border-bottom: none; }
.info-label {
  color: var(--text-mid);
  font-size: 0.88rem;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 130px;
}
.info-value {
  color: var(--text-dark);
  font-size: 0.95rem;
  font-weight: 500;
  word-break: break-word;
  text-align: start;
}

/* Button row */
.page-btn-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* History entry cards */
.history-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  border: 1px solid rgba(45,106,45,0.1);
  margin-bottom: 1rem;
  transition: box-shadow 0.25s, transform 0.25s;
}
.history-card:hover {
  box-shadow: 0 8px 24px rgba(45,106,45,0.12);
  transform: translateY(-2px);
}
.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.history-type-badge {
  background: rgba(45,106,45,0.1);
  color: var(--green-mid);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
}
.history-date {
  color: var(--text-mid);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 5px;
}
.history-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(45,106,45,0.07);
}

/* Empty state */
.page-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-mid);
}
.page-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1.2rem;
  opacity: 0.35;
  display: block;
}
.page-empty-title {
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.page-empty-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0;
}

/* Pagination wrapper */
.page-pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}
.page-pagination nav { font-family: 'Tajawal', sans-serif; }
.page-pagination nav span,
.page-pagination nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 0.88rem;
  border: 1px solid rgba(45,106,45,0.18);
  margin: 0 2px;
  text-decoration: none;
  color: var(--text-dark);
}
.page-pagination nav a:hover {
  background: rgba(45,106,45,0.08);
  color: var(--green-mid);
}
.page-pagination nav span[aria-current] {
  background: var(--green-mid);
  color: white;
  border-color: var(--green-mid);
}

/* Uploaded image */
.page-image-block {
  text-align: center;
  margin-top: 1rem;
}
.page-image-block img {
  max-width: 100%;
  max-height: 420px;
  border-radius: 16px;
  border: 2px solid rgba(45,106,45,0.15);
  box-shadow: 0 8px 32px rgba(26,42,26,0.1);
}

/* Responsive */
@media (max-width: 767px) {
  .page-hero { padding: 3rem 1.2rem 2.5rem; }
  .page-container { padding: 1.5rem 1rem 3rem; }
  .page-section { padding: 1.5rem; }
  .info-label { min-width: 100px; }
  .page-btn-row { flex-direction: column; }
  .page-btn-row .btn-primary,
  .page-btn-row .btn-secondary { justify-content: center; width: 100%; }
  .history-card-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .nav-links li form { width: 100%; }
  .nav-links li .nav-logout-btn { display: block; padding: 1rem 1.5rem; width: 100%; text-align: right; }
}

/* Feature 016 — profile recognition cards */
.profile-rec-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(45,106,45,0.1);
  margin-bottom: 0.8rem;
  transition: box-shadow 0.25s, transform 0.25s;
}
.profile-rec-card:hover {
  box-shadow: 0 6px 18px rgba(45,106,45,0.10);
  transform: translateY(-1px);
}
.profile-rec-thumb {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(45,106,45,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.profile-rec-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-rec-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.profile-rec-body .info-row {
  margin: 0;
  padding: 0;
  border: none;
}
.profile-rec-date {
  color: var(--text-mid);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 5px;
}
@media (max-width: 600px) {
  .profile-rec-card { flex-direction: column; align-items: stretch; text-align: center; }
  .profile-rec-thumb { margin: 0 auto; }
}
}