/*
Theme Name:   EV Community India (GeneratePress Child)
Theme URI:    https://evcommunity.in
Description:  Child theme for evcommunity.in: EV tools hub, news, community listings and a safe submission form.
Author:       EV Community India
Template:     generatepress
Version:      1.0.0
License:      GPL-2.0-or-later
Text Domain:  evcommunity
*/

:root {
  --ev-green: #0a7d4f;
  --ev-green-dark: #065c3a;
  --ev-green-soft: #e6f5ee;
  --ev-ink: #12201a;
  --ev-muted: #5a6b62;
  --ev-line: #dbe7e0;
  --ev-bg: #f6faf8;
  --ev-card: #ffffff;
  --ev-accent: #f5a623;
  --ev-radius: 14px;
  --ev-shadow: 0 1px 2px rgba(10, 40, 25, .06), 0 8px 24px rgba(10, 40, 25, .06);
  --ev-wrap: 1180px;
}

body { background: var(--ev-bg); color: var(--ev-ink); }
a { color: var(--ev-green); }
a:hover { color: var(--ev-green-dark); }

.ev-wrap { max-width: var(--ev-wrap); margin: 0 auto; padding: 0 20px; }
.ev-section { padding: 56px 0; }
.ev-section--alt { background: #fff; border-top: 1px solid var(--ev-line); border-bottom: 1px solid var(--ev-line); }
.ev-section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.ev-section__head h2 { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.01em; }
.ev-section__head p { margin: 4px 0 0; color: var(--ev-muted); }
.ev-link-more { font-weight: 600; text-decoration: none; }

/* Buttons */
.ev-btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; transition: transform .15s ease, background .15s ease; cursor: pointer; font-size: 1rem; line-height: 1.2; }
.ev-btn:hover { transform: translateY(-1px); }
.ev-btn--primary { background: var(--ev-green); color: #fff; }
.ev-btn--primary:hover { background: var(--ev-green-dark); color: #fff; }
.ev-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.ev-btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.ev-btn--light { background: #fff; color: var(--ev-green-dark); }
.ev-btn--light:hover { background: var(--ev-green-soft); color: var(--ev-green-dark); }

/* Hero */
.ev-hero { background: linear-gradient(135deg, #064d31 0%, #0a7d4f 55%, #14a36a 100%); color: #fff; padding: 84px 0 72px; position: relative; overflow: hidden; }
.ev-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%); }
.ev-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; margin: 0 0 16px; letter-spacing: -.02em; max-width: 16ch; }
.ev-hero p { font-size: 1.15rem; max-width: 56ch; color: rgba(255, 255, 255, .9); margin: 0 0 28px; }
.ev-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ev-hero__stats { display: flex; gap: 32px; margin-top: 44px; flex-wrap: wrap; }
.ev-hero__stats div strong { display: block; font-size: 1.6rem; }
.ev-hero__stats div span { font-size: .9rem; color: rgba(255, 255, 255, .8); }

/* Cards and grids */
.ev-grid { display: grid; gap: 20px; }
.ev-grid--tools { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ev-grid--posts { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ev-grid--listings { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.ev-card { background: var(--ev-card); border: 1px solid var(--ev-line); border-radius: var(--ev-radius); box-shadow: var(--ev-shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.ev-card:hover { transform: translateY(-3px); }
.ev-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ev-card__title { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.ev-card__title a { text-decoration: none; color: var(--ev-ink); }
.ev-card__title a:hover { color: var(--ev-green); }
.ev-card__meta { color: var(--ev-muted); font-size: .88rem; }
.ev-card__excerpt { color: var(--ev-muted); font-size: .95rem; margin: 0; }
.ev-card__img { aspect-ratio: 16 / 9; background: var(--ev-green-soft); object-fit: cover; width: 100%; display: block; }

.ev-tool { padding: 20px; text-decoration: none; color: var(--ev-ink); display: flex; flex-direction: column; gap: 8px; }
.ev-tool__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--ev-green-soft); color: var(--ev-green); display: grid; place-items: center; font-size: 1.4rem; }
.ev-tool strong { font-size: 1.05rem; }
.ev-tool span { color: var(--ev-muted); font-size: .92rem; }

.ev-tag { display: inline-block; background: var(--ev-green-soft); color: var(--ev-green-dark); border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 600; }

/* Community call to action */
.ev-cta { background: var(--ev-green-dark); color: #fff; border-radius: 20px; padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ev-cta h2 { color: #fff; margin: 0 0 6px; }
.ev-cta p { margin: 0; color: rgba(255, 255, 255, .85); }

/* Listing page */
.ev-listing-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 20px 0; }
.ev-listing-meta div { background: var(--ev-green-soft); border-radius: 12px; padding: 12px 16px; }
.ev-listing-meta dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ev-muted); }
.ev-listing-meta dd { margin: 2px 0 0; font-weight: 600; }
.ev-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.ev-filters a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--ev-line); background: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; }
.ev-filters a.is-active, .ev-filters a:hover { background: var(--ev-green); color: #fff; border-color: var(--ev-green); }

/* Submission form */
.ev-form { background: #fff; border: 1px solid var(--ev-line); border-radius: var(--ev-radius); padding: 28px; box-shadow: var(--ev-shadow); max-width: 720px; }
.ev-form label { display: block; font-weight: 600; margin: 16px 0 6px; }
.ev-form input[type=text], .ev-form input[type=email], .ev-form input[type=url], .ev-form select, .ev-form textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--ev-line); border-radius: 10px; font-size: 1rem; background: #fff; }
.ev-form input:focus, .ev-form select:focus, .ev-form textarea:focus { outline: 2px solid var(--ev-green); outline-offset: 1px; }
.ev-form .ev-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.ev-notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; }
.ev-notice--ok { background: #e3f6ec; color: #0b5e3b; border: 1px solid #b8e3cc; }
.ev-notice--err { background: #fdecec; color: #8a1f1f; border: 1px solid #f3bcbc; }

@media (max-width: 640px) {
  .ev-hero { padding: 56px 0 48px; }
  .ev-section { padding: 40px 0; }
  .ev-cta { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ev-btn, .ev-card { transition: none; }
}
