/* =============================================
   INW — India Nature Watch
   Design system & page styles
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Blue palette */
  --blue-950: #060f1e;
  --blue-900: #0d1b2e;
  --blue-800: #132844;
  --blue-700: #1a3a5c;
  --blue-600: #1e4d7b;
  --blue-500: #1d6fa4;
  --blue-400: #2a8fc4;
  --blue-300: #5ab0d8;
  --blue-100: #e0f0f9;
  --blue-50:  #f0f8fd;

  /* Neutral */
  --white:    #ffffff;
  --gray-50:  #f7f9fc;
  --gray-100: #edf1f5;
  --gray-200: #d8e0ea;
  --gray-300: #b8c5d4;
  --gray-500: #6a7d92;
  --gray-700: #364656;
  --gray-900: #1a2433;

  --text:       #162032;
  --text-muted: #546070;

  --font-body:    'Lato', system-ui, sans-serif;
  --font-display: 'Lato', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 4px rgba(0,20,40,.07);
  --shadow-md: 0 4px 16px rgba(0,20,40,.12);
  --shadow-lg: 0 8px 32px rgba(0,20,40,.18);

  --transition: 200ms ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300; /* Lato Light as default */
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 15px;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a  { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section      { padding: 72px 0; }
.bg-subtle    { background: var(--gray-50); }

/* --- Buttons --- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-500);
  color: var(--white);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  border: none; cursor: pointer;
  transition: background var(--transition);
}
.btn-primary:hover { background: var(--blue-700); }

.btn-ghost {
  display: inline-flex; align-items: center;
  background: transparent;
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.btn-ghost:hover { border-color: var(--blue-500); color: var(--blue-500); }

/* =============================================
   HEADER / NAV
   ============================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-100);
}

.site-header .container {
  display: flex; align-items: center; gap: 32px;
  height: 64px;
}

.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--blue-900);
  white-space: nowrap;
}
.logo-icon { font-size: 20px; }

.main-nav {
  display: flex; gap: 4px;
  flex: 1;
}
.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.main-nav a:hover, .main-nav a.active {
  color: var(--blue-700);
  background: var(--blue-50);
}

.nav-actions { display: flex; gap: 8px; margin-left: auto; }

.hamburger {
  display: none;
  background: none; border: none;
  font-size: 22px; cursor: pointer;
  color: var(--text); margin-left: auto;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  height: min(620px, 72vw);
  min-height: 380px;
  overflow: hidden;
  display: flex; align-items: center;
}

.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.04);
  transition: transform 10s ease;
}
.hero:hover .hero-bg { transform: scale(1); }

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg,
    rgba(6,15,30,0.88) 0%,
    rgba(13,27,46,0.55) 55%,
    transparent 100%);
}

.hero-content {
  position: relative;
  color: var(--white);
  max-width: 580px;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-content p {
  font-size: clamp(14px, 2vw, 17px);
  opacity: 0.85;
  margin-bottom: 28px;
  max-width: 460px;
}

.hero-search {
  display: flex;
  max-width: 500px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-search input {
  flex: 1;
  padding: 14px 18px;
  font-size: 14px;
  border: none; outline: none;
  color: var(--text);
}
.hero-search .btn-primary {
  border-radius: 0;
  padding: 14px 24px;
  font-size: 14px;
}

/* =============================================
   CATEGORY TILES
   ============================================= */
.section-header {
  display: flex; align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 32px;
}
.section-header .section-title { margin-bottom: 0; }

.view-all {
  font-size: 14px; font-weight: 500;
  color: var(--blue-500);
  transition: color var(--transition);
}
.view-all:hover { color: var(--blue-700); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cat-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.cat-card img {
  position: absolute; inset: 0;
  transition: transform 400ms ease;
}
.cat-card:hover img { transform: scale(1.06); }

.cat-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 36px 14px 14px;
  background: linear-gradient(transparent, rgba(6,15,30,0.78));
  color: var(--white);
  display: flex; flex-direction: column; gap: 2px;
}
.cat-name  { font-size: 15px; font-weight: 600; }
.cat-count { font-size: 12px; opacity: 0.75; }

/* =============================================
   IMAGE GRID
   ============================================= */
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.image-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: transform var(--transition), box-shadow var(--transition);
}
.image-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.image-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-100);
}
.image-thumb img { transition: transform 400ms ease; }
.image-card:hover .image-thumb img { transform: scale(1.05); }

.image-meta {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.img-title {
  font-size: 14px; font-weight: 500;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.img-author { font-size: 12px; color: var(--text-muted); }

/* =============================================
   STATS STRIP
   ============================================= */
.stats-strip {
  background: var(--blue-900);
  color: var(--white);
  padding: 52px 0;
}
.stats-strip .container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 32px;
}
.stat {
  text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}
.stat strong {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--blue-300);
}
.stat span {
  font-size: 12px; opacity: 0.65;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--blue-950);
  color: rgba(255,255,255,0.6);
  padding: 52px 0 32px;
}
.site-footer .container {
  display: flex; flex-direction: column; gap: 24px;
}
.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 600;
  color: var(--white);
  display: block; margin-bottom: 8px;
}
.footer-brand p { font-size: 13px; max-width: 360px; }

.footer-links {
  display: flex; gap: 24px; flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }

.copyright { font-size: 12px; opacity: 0.4; border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; }

/* =============================================
   GALLERY PAGE
   ============================================= */
.gallery-hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  color: var(--white);
  padding: 52px 0 36px;
}
.gallery-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 8px;
}
.gallery-hero p { opacity: 0.65; font-size: 14px; }

/* Shorter hero variant on gallery page */
.gallery-page-hero {
  height: 260px !important;
  min-height: 200px !important;
}
.gallery-page-hero .hero-content h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
}

.gallery-toolbar {
  display: flex; gap: 12px; align-items: center;
  padding: 20px 0;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex; gap: 8px; flex-wrap: wrap; flex: 1;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--gray-200);
  color: var(--text-muted);
  cursor: pointer; background: var(--white);
  transition: all var(--transition);
}
.chip:hover, .chip.active {
  background: var(--blue-500);
  color: var(--white);
  border-color: var(--blue-500);
}

.sort-select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  font-size: 13px; color: var(--text);
  background: var(--white); cursor: pointer;
  outline: none;
}
.sort-select:focus { border-color: var(--blue-500); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding-bottom: 72px;
}

/* =============================================
   IMAGE DETAIL PAGE
   ============================================= */
.image-detail {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  padding: 40px 0 72px;
  align-items: start;
}

.image-viewer {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0a0f18;
}
.image-viewer img {
  width: 100%; height: auto;
  object-fit: contain;
}

.image-nav {
  display: flex; justify-content: space-between;
  margin-top: 12px;
}

.image-title-block { margin-bottom: 20px; }
.image-title-block h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 4px;
  color: var(--blue-900);
}
.image-title-block .sci-name {
  font-style: italic; color: var(--text-muted); font-size: 14px;
}

.meta-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 13px;
}
.meta-table th {
  text-align: left; padding: 7px 0;
  color: var(--text-muted); font-weight: 500;
  width: 110px; vertical-align: top;
  border-bottom: 1px solid var(--gray-100);
}
.meta-table td {
  padding: 7px 0; color: var(--text);
  border-bottom: 1px solid var(--gray-100);
}

.tag-list {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--blue-100);
  cursor: pointer;
  transition: background var(--transition);
}
.tag:hover { background: var(--blue-100); }

.photographer-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
  margin-bottom: 20px;
}
.photographer-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 600; flex-shrink: 0;
}
.photographer-info .name { font-weight: 600; font-size: 14px; }
.photographer-info .sub  { font-size: 12px; color: var(--text-muted); }

.like-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-size: 13px; font-weight: 500;
  cursor: pointer; color: var(--text-muted);
  transition: all var(--transition);
  margin-bottom: 20px;
}
.like-btn:hover { border-color: #e54d4d; color: #e54d4d; }
.like-btn.liked { background: #fff0f0; border-color: #e54d4d; color: #e54d4d; }

.comments-section h3 {
  font-size: 15px; font-weight: 600; margin-bottom: 12px;
  color: var(--blue-900);
}
.comment-login {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px dashed var(--gray-200);
  font-size: 13px; color: var(--text-muted);
  text-align: center;
}
.comment-login a { color: var(--blue-500); font-weight: 500; }

.comment-item {
  display: flex;
  gap: 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}
.comment-avatar-wrap { flex-shrink: 0; }
.comment-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  overflow: hidden;
}
.comment-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header {
  display: flex; gap: 8px; align-items: baseline;
  margin-bottom: 6px; flex-wrap: wrap;
}
.comment-author {
  font-size: 13px; font-weight: 700;
  color: var(--blue-600);
  text-decoration: none;
}
.comment-author:hover { text-decoration: underline; }
.comment-subject { font-size: 13px; font-weight: 600; color: var(--text); }
.comment-date   { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.comment-text   { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* =============================================
   ABOUT PAGE
   ============================================= */
.about-hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  color: var(--white);
  padding: 80px 0 64px;
  text-align: center;
}
.about-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 16px;
}
.about-hero p {
  font-size: 17px; opacity: 0.75;
  max-width: 520px; margin: 0 auto;
}

.about-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px;
}
.about-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--blue-900);
  margin: 40px 0 12px;
}
.about-body p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.founders-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.founder-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.founder-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-700);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600; flex-shrink: 0;
}
.founder-name { font-weight: 600; font-size: 14px; }

/* =============================================
   UPLOAD PAGE
   ============================================= */
.upload-page { max-width: 680px; margin: 0 auto; padding: 48px 24px; }
.upload-page h1 {
  font-family: var(--font-display);
  font-size: 2rem; color: var(--blue-900);
  margin-bottom: 32px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  font-size: 14px; color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition);
  font-family: var(--font-body);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--blue-500); }
.form-group textarea { resize: vertical; min-height: 80px; }

.upload-dropzone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--gray-50);
  margin-bottom: 20px;
}
.upload-dropzone:hover { border-color: var(--blue-500); background: var(--blue-50); }
.upload-dropzone p { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.upload-dropzone .hint { font-size: 12px; margin-top: 4px; }

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

@media (max-width: 768px) {
  .main-nav, .nav-actions { display: none; }
  .hamburger { display: block; }

  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .image-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 48px 0; }
}

@media (max-width: 480px) {
  .image-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .stats-strip .container { flex-direction: column; align-items: center; }
  .founders-grid { grid-template-columns: 1fr; }
}
