/*
Theme Name: Ashok Singhal & Co.
Theme URI: https://ashoksinghal.com
Author: Built for Ashok Singhal & Co.
Author URI: https://ashoksinghal.com
Description: A minimalist, light, finance-industry theme for Ashok Singhal & Co., Chartered Accountants. Built as a clean, Elementor-ready base theme — Elementor handles page layouts; this theme supplies the header, footer, global colors, and typography.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
Text Domain: ashoksinghal
Tags: minimal, finance, elementor, blog, custom-colors, custom-logo, custom-menu, translation-ready
*/

/* ==========================================================================
   Brand tokens — light, finance-industry palette (Elementor Global Colors
   are set to match these in functions.php; keep both in sync if you change
   a value here).
   ========================================================================== */
:root {
  --asc-bg: #FAFAF8;          /* primary background — off-white */
  --asc-bg-alt: #F2F5F7;      /* secondary background — pale grey-blue */
  --asc-text: #1A2B3C;        /* primary text — charcoal navy */
  --asc-accent: #1F5C99;      /* accent / CTA — deep trust blue */
  --asc-accent-2: #B8964A;    /* secondary accent — muted gold, use sparingly */
  --asc-success: #5B8266;     /* soft sage green */
  --asc-border: #E3E5E2;      /* light grey borders/dividers */
  --asc-font-heading: "Lora", "Georgia", serif;
  --asc-font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--asc-bg);
  color: var(--asc-text);
  font-family: var(--asc-font-body);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--asc-font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--asc-text);
  margin: 0 0 0.6em;
}
a { color: var(--asc-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ==========================================================================
   Layout container
   ========================================================================== */
.asc-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Site header
   ========================================================================== */
.asc-header {
  background: var(--asc-bg);
  border-bottom: 1px solid var(--asc-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.asc-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.asc-logo { display: flex; align-items: center; gap: 10px; font-family: var(--asc-font-heading); font-size: 22px; font-weight: 700; color: var(--asc-text); }
.asc-logo img { max-height: 44px; width: auto; }
.asc-nav { position: relative; }
.asc-nav > ul {
  list-style: none; display: flex; gap: 26px; margin: 0; padding: 0;
}
.asc-nav > ul > li { position: relative; }
.asc-nav a { color: var(--asc-text); font-size: 15px; font-weight: 500; display: block; }
.asc-nav a:hover { color: var(--asc-accent); text-decoration: none; }

/* Top-level item that has children gets a small chevron */
.asc-nav > ul > li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.6;
}

/* Dropdown submenu — hidden by default, shown on hover/focus-within, and
   via .is-open (added by the mobile toggle script in header.php) */
.asc-nav ul .sub-menu {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--asc-bg);
  border: 1px solid var(--asc-border);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(26, 43, 60, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 200;
}
.asc-nav ul .sub-menu .sub-menu { top: 0; left: 100%; }
.asc-nav > ul > li.menu-item-has-children:hover > .sub-menu,
.asc-nav > ul > li.menu-item-has-children:focus-within > .sub-menu,
.asc-nav ul li.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.asc-nav .sub-menu li { position: relative; }
.asc-nav .sub-menu a {
  padding: 9px 18px;
  font-size: 14px;
  white-space: nowrap;
}
.asc-nav .sub-menu a:hover { background: var(--asc-bg-alt); }

.asc-header__cta {
  display: inline-block;
  background: var(--asc-accent);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.asc-header__cta:hover { background: #17456f; text-decoration: none; }
.asc-mobile-toggle { display: none; background: none; border: 0; font-size: 24px; color: var(--asc-text); cursor: pointer; }

/* ==========================================================================
   Mobile navigation — collapses to a hamburger-triggered dropdown panel.
   Toggling is handled by the small script enqueued from header.php.
   ========================================================================== */
@media (max-width: 860px) {
  .asc-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--asc-bg);
    border-bottom: 1px solid var(--asc-border);
    box-shadow: 0 8px 24px rgba(26, 43, 60, 0.08);
  }
  .asc-nav.is-open { display: block; }
  .asc-nav > ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .asc-nav > ul > li { border-top: 1px solid var(--asc-border); }
  .asc-nav > ul > li:first-child { border-top: 0; }
  .asc-nav a { padding: 12px 24px; }
  .asc-nav > ul > li.menu-item-has-children > a::after { float: right; margin-top: 5px; }

  /* On mobile, submenus expand in place (accordion) instead of a floating
     dropdown — .is-open is toggled by tapping the chevron/parent link. */
  .asc-nav ul .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    border: 0;
    box-shadow: none;
    background: var(--asc-bg-alt);
    padding: 0;
  }
  .asc-nav ul li.is-open > .sub-menu { display: block; }
  .asc-nav .sub-menu a { padding-left: 40px; }
  .asc-nav .sub-menu .sub-menu a { padding-left: 56px; }

  .asc-mobile-toggle { display: block; }
  .asc-header__cta { padding: 9px 16px; font-size: 13px; }
}

/* ==========================================================================
   Site footer
   ========================================================================== */
.asc-footer {
  background: var(--asc-bg-alt);
  border-top: 1px solid var(--asc-border);
  padding: 60px 0 30px;
  margin-top: 80px;
  font-size: 15px;
}
.asc-footer__grid {
  display: grid;
  gap: 40px;
  margin-bottom: 40px;
}
.asc-footer__grid--4col { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.asc-footer__grid--1col { grid-template-columns: 1fr; max-width: 720px; }
.asc-footer h4 {
  font-family: var(--asc-font-heading);
  font-size: 16px;
  margin-bottom: 14px;
  color: var(--asc-text);
}
.asc-footer p, .asc-footer li { color: #4A5A6A; margin: 0 0 8px; }
.asc-footer ul { list-style: none; margin: 0; padding: 0; }
.asc-footer a { color: #4A5A6A; }
.asc-footer a:hover { color: var(--asc-accent); }
.asc-footer__col-content p:last-child { margin-bottom: 0; }
.asc-footer__bottom {
  border-top: 1px solid var(--asc-border);
  padding-top: 20px;
  text-align: center;
  color: #7A8794;
  font-size: 13px;
}
.asc-footer__bottom a { color: #7A8794; text-decoration: underline; }
@media (max-width: 780px) {
  .asc-footer__grid--4col { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Generic content styling (fallback for non-Elementor pages/posts)
   ========================================================================== */
.asc-content { padding: 60px 0; }
.asc-content .wp-block-image { margin: 24px 0; }
.asc-content .wp-block-table table { width: 100%; border-collapse: collapse; }
.asc-content .wp-block-table th, .asc-content .wp-block-table td {
  border: 1px solid var(--asc-border);
  padding: 10px 14px;
  text-align: left;
}
.asc-content .wp-block-table th { background: var(--asc-accent); color: #fff; font-weight: 600; }
.asc-content .wp-block-button__link {
  background: var(--asc-accent);
  color: #fff !important;
  padding: 12px 26px;
  border-radius: 3px;
  font-weight: 600;
  display: inline-block;
}
.asc-content .wp-block-button__link:hover { background: #17456f; text-decoration: none; }
.asc-content blockquote {
  border-left: 3px solid var(--asc-accent-2);
  margin: 24px 0;
  padding: 8px 0 8px 20px;
  color: #4A5A6A;
  font-style: italic;
}
