/* ==========================================================================
   Sri Krishna Contest - visual enhancement layer
   Loaded after arpanam-theme.css on index.php only.
   Adds colour and depth to the hero, section cards, table and registration
   form. Markup / JS hooks are unchanged. The footer is intentionally NOT
   restyled here.
   ========================================================================== */

:root {
  --am-plum: #3a0f4d;
  --am-saffron: #f59e0b;
  --am-saffron-soft: #fff6e6;
  --am-teal: #0e9aa7;
  --am-grad-brand: linear-gradient(120deg, #db0074 0%, #a3007a 55%, #5b2a86 100%);
  --am-grad-blue: linear-gradient(135deg, #006b9b 0%, #0e9aa7 100%);
}

/* ---------- Page background: soft warm tint instead of flat grey ---------- */
body.am-theme {
  background-color: #f6f4fa;
  background-image:
    radial-gradient(1100px 520px at -10% 8%, rgba(219, 0, 116, .07), transparent 60%),
    radial-gradient(900px 520px at 110% 22%, rgba(245, 158, 11, .08), transparent 60%),
    radial-gradient(1000px 600px at 50% 70%, rgba(0, 107, 155, .06), transparent 65%);
  background-attachment: fixed;
}

/* ---------- Hero ---------- */
.am-hero-card {
  border-radius: 0 0 20px 20px;
  box-shadow: 0 2px 4px rgba(58, 15, 77, .05), 0 20px 48px rgba(58, 15, 77, .14);
}
.am-hero-media { background: var(--am-plum); }
.am-hero-media .banner-image { image-rendering: auto; }
/* Rich plum overlay instead of flat black: keeps the painting vivid, text readable */
.am-hero-overlay {
  background:
    linear-gradient(270deg, rgba(38, 8, 52, .88) 0%, rgba(38, 8, 52, .64) 34%, rgba(38, 8, 52, .12) 60%, rgba(38, 8, 52, 0) 100%),
    linear-gradient(0deg, rgba(38, 8, 52, .38) 0%, rgba(38, 8, 52, 0) 45%);
}
.am-hero-title { text-shadow: 0 2px 22px rgba(20, 0, 30, .35); }
/* Thin golden accent under the title */
.am-hero-title::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--am-saffron), #ffd166);
}
.am-hero-actions .am-btn-primary {
  background: var(--am-grad-brand);
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(219, 0, 116, .4);
}
.am-hero-actions .am-btn-primary:hover { filter: brightness(1.06); box-shadow: 0 12px 30px rgba(219, 0, 116, .5); }

/* Facts strip: a touch more presence */
.am-hero-facts { background: linear-gradient(180deg, #fff 0%, #fdfbff 100%); }
.am-fact-value { color: var(--am-ink); }

/* ---------- Section cards: coloured accent + icon badges ---------- */
.am-main .am-section > .am-card,
.am-aside .am-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(58, 15, 77, .06);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px rgba(58, 15, 77, .07);
}
.am-main .am-section > .am-card::before,
.am-aside .am-organizer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--am-accent, var(--am-grad-brand));
}
.am-main .am-section > .am-card { padding: 24px; }

.am-section-head h2 { color: #1d2033; font-size: 20px; }
.am-theme .am-section-icon {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
  color: #fff;
  background: var(--am-accent, var(--am-grad-brand));
  box-shadow: 0 6px 14px var(--am-accent-shadow, rgba(219, 0, 116, .25));
  box-sizing: border-box;
}
.am-theme #overview  { --am-accent: var(--am-grad-blue); --am-accent-shadow: rgba(0, 107, 155, .25); }
.am-theme #books     { --am-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 100%); --am-accent-shadow: rgba(245, 158, 11, .3); }
.am-theme #register  { --am-accent: var(--am-grad-brand); --am-accent-shadow: rgba(219, 0, 116, .3); }
.am-theme #steps     { --am-accent: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%); --am-accent-shadow: rgba(124, 58, 237, .25); }
.am-theme #timeline  { --am-accent: linear-gradient(135deg, #2f7a12 0%, #22a06b 100%); --am-accent-shadow: rgba(47, 122, 18, .25); }
.am-theme #contactus { --am-accent: linear-gradient(135deg, #0e9aa7 0%, #006b9b 100%); --am-accent-shadow: rgba(14, 154, 167, .25); }

.am-theme .am-card-title { color: #1d2033; }

/* ---------- Prescribed books table ---------- */
.am-table {
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: 0 0 0 1px #f1e3c8;
}
.am-table th {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: #fff;
  border: 0;
  font-weight: 600;
  letter-spacing: .01em;
}
.am-table td { border: 0; border-top: 1px solid #f3ead9; }
.am-table tbody tr:nth-child(odd) { background: #fffaf1; }
.am-table tbody tr { transition: background .2s; }
.am-table tbody tr:hover { background: #fff1db; }
.am-table td:first-child { font-weight: 600; color: #b45309; }

/* ---------- Registration card ---------- */
.am-theme #register .am-register-card {
  border: 1px solid rgba(219, 0, 116, .14);
  box-shadow: 0 2px 4px rgba(219, 0, 116, .04), 0 18px 44px rgba(91, 42, 134, .14);
}
.am-theme #register .am-register-card::before { display: none; }

/* Gradient header band */
.am-theme .am-register-head {
  position: relative;
  margin: -24px -24px 24px;
  padding: 22px 24px;
  width: auto;
  background: var(--am-grad-brand);
  overflow: hidden;
}
.am-theme .am-register-head::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  pointer-events: none;
}
.am-theme .am-register-head .am-section-icon {
  width: 46px;
  height: 46px;
  padding: 11px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: none;
}
.am-register-head-text { position: relative; z-index: 1; flex: 1; min-width: 0; }
.am-theme .am-register-head h2 { color: #fff; font-size: 22px; margin: 0; }
.am-register-head-text p { margin: 2px 0 0; font-size: 14px; color: rgba(255, 255, 255, .85); }

/* Numbered, coloured section headings inside the form */
.am-theme #register #regForm { counter-reset: regstep; }
.am-theme #register .reg-heading {
  gap: 12px;
  font-size: 17px;
  font-weight: 600;
  color: #1d2033;
  margin-top: 6px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e7dcef;
}
.am-theme #register .reg-heading::before {
  counter-increment: regstep;
  content: counter(regstep);
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--am-grad-brand);
  box-shadow: 0 4px 10px rgba(219, 0, 116, .28);
}

/* Inputs: soft tinted fields, brand focus ring */
.am-theme #register .form_wrapper input[type=text],
.am-theme #register .form_wrapper input[type=email],
.am-theme #register .form_wrapper input[type=tel],
.am-theme #register .select_option select {
  background: #fcfbfe;
  border: 1px solid #e4dfec;
  border-radius: 10px;
}
.am-theme #register .form_wrapper input[type=text]:hover,
.am-theme #register .form_wrapper input[type=email]:hover,
.am-theme #register .form_wrapper input[type=tel]:hover,
.am-theme #register .select_option select:hover { background: #fff; border-color: #cfc4dc; }
.am-theme #register .form_wrapper input[type=text]:focus,
.am-theme #register .form_wrapper input[type=email]:focus,
.am-theme #register .form_wrapper input[type=tel]:focus,
.am-theme #register .select_option select:focus {
  background: #fff;
  border-color: #db0074;
  box-shadow: 0 0 0 4px rgba(219, 0, 116, .12);
}
.am-theme #register #book_name { background: #f6f1fa; color: #5b2a86; font-weight: 500; }
.am-theme #register .select_option::after { border-color: #a3007a; }
.am-theme #register input:focus ~ label.custom-label,
.am-theme #register input:valid ~ label.custom-label,
.am-theme #register select:focus ~ label.custom-label,
.am-theme #register select:valid ~ label.custom-label { color: #a3007a; }

/* Fee summary (shown/hidden by custom.js - do not set display here) */
/* (style.css gives every form column `padding: 0 15px` inside a -15px row, so the
   box is inset by 15px to line up with the fields above) */
.am-theme #register .form_wrapper .row > .priceDiv {
  width: calc(100% - 30px);
  margin: 16px 15px 0;
  background: linear-gradient(120deg, #fff0f7 0%, #f6ecff 100%);
  border: 1px solid rgba(219, 0, 116, .18);
  border-left: 4px solid #db0074;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 17px;
  color: #3a0f4d;
}
.am-theme .priceDiv .rupeeIcon { margin-right: 8px; }
.am-theme .priceDiv .price { display: inline; font-weight: 700; vertical-align: middle; }

/* Submit button */
.am-theme #register .btn-submit {
  background: var(--am-grad-brand);
  border-radius: 12px;
  padding: 15px 64px;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 12px 28px rgba(219, 0, 116, .3);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.am-theme #register .btn-submit:hover {
  background: var(--am-grad-brand);
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(219, 0, 116, .38);
}

/* ---------- Steps ---------- */
.am-theme .am-step-dot {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .14), 0 4px 10px rgba(124, 58, 237, .25);
}
.am-theme .am-step-list li:not(:last-child)::before { background: linear-gradient(180deg, rgba(124, 58, 237, .35), rgba(124, 58, 237, .08)); }

/* ---------- Sidebar ---------- */
.am-aside .am-organizer::before { background: var(--am-grad-brand); }

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
  /* Slightly taller hero on phones so the faces sit clear of the title text */
  .am-hero-media .banner-image { aspect-ratio: 20 / 27; object-position: center top; }
  .am-hero-overlay {
    background: linear-gradient(0deg, rgba(38, 8, 52, .92) 0%, rgba(38, 8, 52, .66) 38%, rgba(38, 8, 52, 0) 70%);
  }
  .am-hero-title::after { margin-top: 10px; width: 56px; }
  .am-main .am-section > .am-card { padding: 20px 16px; }
  .am-theme .am-register-head { margin: -20px -16px 20px; padding: 18px 16px; }
  .am-theme .am-register-head h2 { font-size: 19px; }
  .am-theme #register .btn-submit { padding: 15px 24px; }
  body.am-theme { background-attachment: scroll; }
}

/* ==========================================================================
   Mobile menu drawer - slides in from the RIGHT (tablet & mobile only)
   custom.js toggles `nav.active`; arpanam-theme.js adds `body.am-nav-open`.
   ========================================================================== */
.am-drawer-backdrop { display: none; }

@media (max-width: 991.98px) {
  /* keep the open drawer above the bottom dock / WhatsApp button */
  body.am-nav-open { overflow: hidden; }
  body.am-nav-open .header-section { z-index: 1060; }

  .am-theme nav.am-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 86% !important;
    max-width: 360px;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    background: #fff;
    border-radius: 20px 0 0 20px;
    box-shadow: -18px 0 48px rgba(38, 8, 52, .22);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .32s cubic-bezier(.22, .8, .24, 1), visibility 0s linear .32s;
    z-index: 2;
    overflow: hidden;
  }
  .am-theme nav.am-drawer.active {
    left: auto;
    transform: translateX(0);
    visibility: visible;
    transition: transform .32s cubic-bezier(.22, .8, .24, 1), visibility 0s;
  }

  .am-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(20, 6, 30, .5);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: 1;
  }
  nav.am-drawer.active + .am-drawer-backdrop { opacity: 1; pointer-events: auto; }

  /* Head: logo + close */
  .am-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 14px 20px;
    border-bottom: 1px solid var(--am-border-soft);
  }
  .am-drawer-logo { height: 38px; width: auto; }
  .am-theme .am-drawer-close {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--am-border);
    border-radius: 999px;
    background: #fff;
    color: var(--am-ink);
    font-size: 20px;
    cursor: pointer;
    transition: background .2s, color .2s, transform .2s;
  }
  .am-theme .am-drawer-close:hover,
  .am-theme .am-drawer-close:focus-visible { background: var(--am-primary-soft); color: var(--am-primary); outline: none; }

  /* Brand strip */
  .am-drawer-intro {
    margin: 16px 16px 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--am-grad-brand);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 10px 22px rgba(219, 0, 116, .22);
  }
  .am-drawer-kicker { font-size: 17px; font-weight: 700; letter-spacing: -.005em; }
  .am-drawer-sub { font-size: 13px; color: rgba(255, 255, 255, .85); }

  /* Links */
  .am-theme nav.am-drawer ul.am-drawer-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 8px 10px;
  }
  .am-theme nav.am-drawer ul.am-drawer-list li { border: 0; padding: 0; }
  .am-theme nav.am-drawer a.am-drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 12px;
    margin: 2px 0;
    border-radius: 12px;
    color: var(--am-ink);
    text-decoration: none;
    transition: background .2s;
  }
  .am-theme nav.am-drawer a.am-drawer-link:hover { background: #faf7fc; }
  .am-theme nav.am-drawer a.am-drawer-link.active { background: var(--am-primary-soft); }
  .am-theme nav.am-drawer a.am-drawer-link.active .menu-para { color: var(--am-primary); font-weight: 600; }
  .am-theme nav.am-drawer .menu-para { flex: 1; margin: 0; font-size: 15px; font-weight: 500; color: var(--am-ink); }
  .am-drawer-ico {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
  }
  .am-drawer-ico.d-blue   { background: rgba(0, 107, 155, .1);  color: #006b9b; }
  .am-drawer-ico.d-amber  { background: rgba(245, 158, 11, .14); color: #c2700a; }
  .am-drawer-ico.d-pink   { background: rgba(219, 0, 116, .1);  color: #db0074; }
  .am-drawer-ico.d-purple { background: rgba(124, 58, 237, .1); color: #7c3aed; }
  .am-drawer-ico.d-green  { background: rgba(47, 122, 18, .1);  color: #2f7a12; }
  .am-drawer-ico.d-teal   { background: rgba(14, 154, 167, .12); color: #0b7f8a; }
  .am-drawer-ico.d-gray   { background: #f1f2f4; color: #4a505a; }
  .am-drawer-ext { font-size: 16px; color: #9ca3af; }

  /* Footer: CTA + quick contact */
  .am-drawer-foot {
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--am-border-soft);
    background: #fcfbfe;
  }
  .am-theme a.am-drawer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--am-grad-brand);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(219, 0, 116, .3);
  }
  .am-drawer-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
  .am-theme .am-drawer-quick a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 10px;
    border: 1px solid var(--am-border);
    border-radius: 12px;
    background: #fff;
    color: var(--am-ink);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
  }
  .am-theme .am-drawer-quick a:last-child { color: #1a8a43; border-color: rgba(26, 138, 67, .25); background: #f2fbf5; }
}

@media (prefers-reduced-motion: reduce) {
  .am-theme nav.am-drawer, .am-drawer-backdrop { transition: none !important; }
}

/* Short phones: drop the brand strip so every menu link fits without scrolling */
@media (max-width: 991.98px) and (max-height: 700px) {
  .am-drawer-intro { display: none; }
  .am-theme nav.am-drawer a.am-drawer-link { padding: 8px 12px; }
  .am-drawer-ico { width: 34px; height: 34px; font-size: 17px; }
}
