/* ==========================================================================
   Ramco Vidya Mandir Senior Secondary School, Ariyalur
   Brand layer, loaded after main.css + theme.css (+ home.css).
   Ramco blue #0B419A and yellow #FCD21C; components the WordPress pages needed.
   ========================================================================== */

:root,
:root[data-theme="light"] {
  --ramco-blue: #0b419a;
  --ramco-blue-dark: #082f70;
  --ramco-yellow: #fcd21c;
}
:root[data-theme="dark"] {
  --ramco-blue: #6f9cf0;
  --ramco-blue-dark: #0e2550;
  --ramco-yellow: #fcd21c;
}

/* Masthead */
.cbse-tag { font-weight: 700; letter-spacing: .02em; color: var(--ramco-yellow); }
.h-emblem img { border-radius: 50%; }
.h-name { letter-spacing: .01em; }

/* Small "PDF" marker in menus and side navigation */
.pdf-tag {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 6px;
  font-size: .6875rem; font-weight: 800; letter-spacing: .04em; vertical-align: 1px;
  background: var(--accent-50); color: var(--accent-700);
}
.side-nav .side-label {
  padding: 12px 14px 4px; font-size: .75rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-subtle);
}

/* Figures and text + image splits inside articles */
.prose .figure { margin: 1.5em 0; }
.prose .figure a { display: inline-block; max-width: 100%; vertical-align: top; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.prose .figure img { width: auto; max-width: 100%; height: auto; display: block; transition: transform .5s var(--ease); }
.prose .figure--small img { max-width: 240px; }
.prose .figure a:hover img { transform: scale(1.02); }
.prose .figure figcaption { margin-top: 8px; font-size: var(--fs-sm); color: var(--text-muted); }
.split {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px); align-items: start; margin: 1.25em 0 2em;
}
.split--media-first .split-media { order: -1; }
.split .figure { margin: 0; }
.split-text > :first-child { margin-top: 0; }
@media (max-width: 760px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split--media-first .split-media { order: 0; }
}

/* Cards inside articles */
.prose .cards { margin: 1.5em 0 2em; }
.prose .cards .card h3 { margin-top: 0; font-size: 1.0625rem; }
.prose .cards .card p { margin-bottom: .6em; }
.prose .card-media a { display: block; height: 100%; }
.prose .card .check-list { margin: 0; }

/* Statistics */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 16px; margin: 1.5em 0;
}
.stat {
  display: flex; flex-direction: column; gap: 4px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  border-top: 4px solid var(--accent); box-shadow: var(--shadow-sm);
}
.stat strong { font-family: var(--font-heading); font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.1; color: var(--heading); }
.stat span { color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600; }
.stats--stack { grid-template-columns: minmax(0, 1fr); margin: 0; }

/* Home: welcome */
.welcome-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.welcome-grid .lead { font-size: var(--fs-lg); color: var(--text); }
.welcome-motto { font-family: var(--font-heading); font-style: italic; font-size: 1.25rem; color: var(--accent-700); }
@media (max-width: 860px) { .welcome-grid { grid-template-columns: minmax(0, 1fr); } }

/* Admission notice */
.notice-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: clamp(22px, 3vw, 34px); margin: 0 0 2em;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-50) 100%);
  border-left: 6px solid var(--accent); box-shadow: var(--shadow);
}
.notice-body { flex: 1 1 320px; min-width: 0; }
.notice-body .hero-actions { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.notice-body .btn--outline { overflow-wrap: anywhere; }
.notice-card .qr { width: 150px; height: 150px; border-radius: var(--radius); background: #fff; padding: 8px; border: 1px solid var(--border); flex: none; }

/* Testimonials */
.t-group { margin: 28px 0 14px; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-700); font-family: var(--font-body); font-weight: 800; }
.t-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .t-grid { grid-template-columns: minmax(0, 1fr); } }
.t-card {
  position: relative; margin: 0; padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.t-card .t-mark { width: 28px; height: 28px; color: var(--accent); }
.t-card blockquote { margin: 0; }
.t-card blockquote p { margin: 0; color: var(--text); line-height: 1.6; }
.t-card figcaption { margin-top: auto; display: flex; flex-direction: column; font-size: var(--fs-sm); color: var(--text-muted); }
.t-card figcaption strong { color: var(--heading); font-size: 1rem; }

/* Event cards */
.event-card .card-media { aspect-ratio: 4 / 3; }
.event-card h3 { font-size: 1.0625rem; margin: 0 0 4px; }
.event-card .stretched::after { content: ""; position: absolute; inset: 0; }
.event-card a { text-decoration: none; color: inherit; }

/* Gallery pages */
.album-toc ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 8px; padding: 0; }
.album-toc a { text-decoration: none; }
.album-toc a:hover { background: var(--primary-50); color: var(--primary); }
.album { padding-top: 12px; scroll-margin-top: calc(var(--header-h) + 16px); }
.album h2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 32px 0 16px; }
.album h2 .pill { font-family: var(--font-body); font-size: .75rem; }
.page-layout--full > h2 { margin-top: 36px; }
.page-layout--full > .grid { margin-bottom: 12px; }

/* Buttons and document links in articles */
.btn-row { margin: 1.25em 0; }
.prose .btn { text-decoration: none; }
.doc-link {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap;
}
.doc-link::before {
  content: ""; width: 14px; height: 14px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose .table-wrap { margin: 1em 0 1.75em; }
.prose .data-table td { vertical-align: top; }

/* Forms */
.mail-form { margin: 2em 0 0; }
.mail-form h2 { margin-bottom: 6px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--2 .field--full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid--2 { grid-template-columns: minmax(0, 1fr); } }
.field label span { color: var(--secondary); }
[aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(185, 28, 28, .15); }
.form-actions { margin: 22px 0 0; }
.form-status { margin: 12px 0 0; font-weight: 600; color: var(--primary); }
.form-status:empty { display: none; }
.contact-form-wrap { max-width: 860px; }

/* Ramco yellow details */
.h-rule span:nth-child(2) { background: var(--ramco-yellow); }
.site-footer h2 { color: var(--ramco-yellow); }
.cbse-tag { color: var(--ramco-yellow); }

/* Long CBSE words / table cells should wrap instead of widening the page */
.prose { overflow-wrap: anywhere; }
.data-table th, .data-table td { overflow-wrap: normal; }
