/*
Theme Name: SamvegIAS Pro
Theme URI: https://samvegias.com
Description: Custom production theme for SamvegIAS Academy — Dehradun. Navy/Amber palette, Poppins typeface, Tailwind CSS utility layer. No page builder. No shortcode dependency.
Version: 1.0.7
Author: Netlancer Solutions Pvt. Ltd.
Author URI: https://netlancersolutions.com
Text Domain: samvegias
Tags: custom-menu, custom-logo, featured-images, translation-ready, full-width-template
*/

/* ======================================================================
   BASE RESET & GLOBAL
   Tailwind CDN handles the full utility layer.
   This file covers only what Tailwind cannot express as a static class.
====================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #1f2937;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
}

/* ======================================================================
   HERO GRADIENT BACKGROUND
====================================================================== */

.hero-gradient {
    background: linear-gradient(135deg, #0B2F5C 0%, #154580 100%);
}

/* ======================================================================
   GOLD TEXT GRADIENT — Hero heading highlight
====================================================================== */

.text-gradient {
    background: -webkit-linear-gradient(#E6B325, #F5D061);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* ======================================================================
   LINE CLAMPING UTILITIES
====================================================================== */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ======================================================================
   MOBILE MENU TRANSITION
   JS toggles .active class on #mobile-menu
====================================================================== */

#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu.active {
    max-height: 600px;
    opacity: 1;
}

/* ======================================================================
   STICKY HEADER — shadow added via JS on scroll
====================================================================== */

.site-header {
    transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
}

/* ======================================================================
   HERO SLIDER DOTS
====================================================================== */

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    display: inline-block;
}

.hero-dot.active {
    background-color: #E6B325;
    box-shadow: 0 0 0 3px rgba(230, 179, 37, 0.3);
}

/* ======================================================================
   CURRENT AFFAIRS SLIDER DOTS
====================================================================== */

.ca-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background-color: #DBEAFE;
    cursor: pointer;
    transition: background-color 0.25s ease;
    display: inline-block;
}

.ca-dot.active {
    background-color: #0B2F5C;
    box-shadow: 0 1px 4px rgba(11, 47, 92, 0.3);
}

/* ======================================================================
   SUCCESS STORY CARD — image zoom on hover
====================================================================== */

.story-card {
    overflow: hidden;
}

.story-card img {
    transition: transform 0.7s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-card:hover img {
    transform: scale(1.06);
}

/* ======================================================================
   VIDEO THUMBNAIL — image zoom on hover
====================================================================== */

.video-thumb img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumb:hover img {
    transform: scale(1.05);
}

/* ======================================================================
   FOOTER MENU — WordPress wraps in <ul><li> — strip default styles
====================================================================== */

.footer-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #bfdbfe;
}

.footer-menu ul li {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.footer-menu ul li a {
    color: #bfdbfe;
    text-decoration: none;
    transition: color 0.15s ease;
    display: block;
}

.footer-menu ul li a:hover {
    color: #ffffff;
}

/* ======================================================================
   CUSTOM LOGO — prevent WP wrapping div from breaking flex alignment
====================================================================== */

.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo {
    max-height: 48px;
    width: auto;
}

/* ======================================================================
   WORDPRESS CORE — alignment and caption support
====================================================================== */

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
}

/* ======================================================================
   SCREEN READER ONLY — accessibility helper
====================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ======================================================================
   CONTENT TYPOGRAPHY — .prose-samveg
   Applied to the_content() output in page.php and single.php.
   Styles headings, paragraphs, lists, blockquotes, tables, images
   that WordPress core and Gutenberg blocks output.
====================================================================== */

.prose-samveg {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: #374151;
}

.prose-samveg h1,
.prose-samveg h2,
.prose-samveg h3,
.prose-samveg h4,
.prose-samveg h5,
.prose-samveg h6 {
    font-weight: 800;
    color: #0B2F5C;
    line-height: 1.25;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose-samveg h1 { font-size: 2rem; }
.prose-samveg h2 { font-size: 1.5rem; }
.prose-samveg h3 { font-size: 1.25rem; }
.prose-samveg h4 { font-size: 1.1rem; }
.prose-samveg h5 { font-size: 1rem; }
.prose-samveg h6 { font-size: 0.875rem; }

.prose-samveg p {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.prose-samveg a {
    color: #2563EB;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.prose-samveg a:hover {
    color: #1d4ed8;
}

.prose-samveg strong,
.prose-samveg b {
    font-weight: 700;
    color: #111827;
}

.prose-samveg ul,
.prose-samveg ol {
    margin-top: 0;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose-samveg ul { list-style-type: disc; }
.prose-samveg ol { list-style-type: decimal; }

.prose-samveg li {
    margin-bottom: 0.4rem;
}

.prose-samveg blockquote {
    border-left: 4px solid #E6B325;
    margin: 1.75rem 0;
    padding: 1rem 1.5rem;
    background-color: #fffbf0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #4B5563;
}

.prose-samveg blockquote p:last-child {
    margin-bottom: 0;
}

.prose-samveg code {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    background: #f3f4f6;
    color: #0B2F5C;
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

.prose-samveg pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.prose-samveg pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.prose-samveg table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.prose-samveg th,
.prose-samveg td {
    padding: 0.625rem 1rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.prose-samveg th {
    background: #0B2F5C;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prose-samveg tr:nth-child(even) td {
    background: #f9fafb;
}

.prose-samveg img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.prose-samveg hr {
    border: none;
    border-top: 2px solid #f3f4f6;
    margin: 2.5rem 0;
}

.prose-samveg figure {
    margin: 1.5rem 0;
}

.prose-samveg figcaption {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 0.5rem;
    text-align: center;
}

.prose-samveg .wp-block-button__link {
    display: inline-block;
    background: #0B2F5C;
    color: #ffffff !important;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.15s ease;
}

.prose-samveg .wp-block-button__link:hover {
    background: #154580;
}


/* Rich text support for homepage cards */
.samveg-rich-text p {
    margin: 0 0 0.75rem;
}

.samveg-rich-text p:last-child {
    margin-bottom: 0;
}

.samveg-rich-text a {
    color: #0B2F5C;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

.samveg-rich-text a:hover {
    color: #E64A19;
}


/* Footer widget areas */
.samveg-footer-widget-area .widget:last-child {
    margin-bottom: 0;
}

.samveg-footer-widget-area .widget-title {
    color: #ffffff;
}

.samveg-footer-widget-area ul,
.samveg-footer-widget-area ol,
.samveg-footer-widget-area .menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.samveg-footer-widget-area li {
    margin: 0 0 0.85rem;
}

.samveg-footer-widget-area a {
    color: rgba(191, 219, 254, 0.92);
    text-decoration: none;
    transition: color 0.15s ease;
}

.samveg-footer-widget-area a:hover {
    color: #ffffff;
}

.samveg-footer-widget-area p,
.samveg-footer-widget-area div,
.samveg-footer-widget-area span,
.samveg-footer-widget-area li,
.samveg-footer-widget-area label {
    color: rgba(191, 219, 254, 0.92);
    font-size: 0.75rem;
    line-height: 1.7;
}

.samveg-footer-widget-area .textwidget p {
    margin: 0 0 0.85rem;
}

.samveg-footer-widget-area .textwidget p:last-child {
    margin-bottom: 0;
}

.samveg-footer-widget-area select,
.samveg-footer-widget-area input,
.samveg-footer-widget-area textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: #ffffff;
    border-radius: 0.75rem;
    padding: 0.75rem 0.9rem;
}

.samveg-footer-widget-area ::placeholder {
    color: rgba(255,255,255,0.55);
}


/* ======================================================================
   PRIMARY MENU — real nested dropdown support
====================================================================== */

.samveg-primary-menu,
.samveg-mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.samveg-primary-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.samveg-primary-menu > li {
    position: relative;
}

.samveg-primary-menu > li > a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #0B2F5C;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
    padding: 0.8rem 0;
}

.samveg-primary-menu > li:hover > a,
.samveg-primary-menu > li.current-menu-item > a,
.samveg-primary-menu > li.current-menu-ancestor > a,
.samveg-primary-menu > li.current-menu-parent > a {
    color: #2563EB;
}

.samveg-primary-menu .sub-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    min-width: 240px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.9rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    padding: 0.6rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 60;
}

.samveg-primary-menu .sub-menu .sub-menu {
    top: -0.6rem;
    left: calc(100% - 0.2rem);
}

.samveg-primary-menu li:hover > .sub-menu,
.samveg-primary-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.samveg-primary-menu .sub-menu li {
    position: relative;
}

.samveg-primary-menu .sub-menu a {
    display: block;
    color: #0B2F5C;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    padding: 0.72rem 1rem;
    text-transform: none;
    letter-spacing: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.samveg-primary-menu .sub-menu a:hover,
.samveg-primary-menu .sub-menu li.current-menu-item > a,
.samveg-primary-menu .sub-menu li.current-menu-ancestor > a {
    background: #eff6ff;
    color: #2563EB;
}

.samveg-primary-menu .menu-item-has-children > a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    line-height: 1;
}

.samveg-primary-menu .sub-menu .menu-item-has-children > a::after {
    content: '\f054';
    float: right;
    margin-top: 0.2rem;
}

/* ======================================================================
   MOBILE MENU — accordion submenu support
====================================================================== */

.samveg-mobile-menu > li {
    position: relative;
    border-bottom: 1px solid #f3f4f6;
}

.samveg-mobile-menu a {
    display: block;
    color: #0B2F5C;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.95rem 2.75rem 0.95rem 0;
    transition: color 0.2s ease;
}

.samveg-mobile-menu li.current-menu-item > a,
.samveg-mobile-menu li.current-menu-ancestor > a,
.samveg-mobile-menu a:hover {
    color: #2563EB;
}

.samveg-mobile-menu .sub-menu {
    display: none;
    margin: 0 0 0.75rem;
    padding: 0 0 0 0.9rem;
    border-left: 2px solid #dbeafe;
}

.samveg-mobile-menu li.submenu-open > .sub-menu {
    display: block;
}

.samveg-mobile-menu .sub-menu li {
    border-bottom: 0;
}

.samveg-mobile-menu .sub-menu a {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    padding: 0.7rem 2rem 0.7rem 0;
}

.samveg-mobile-submenu-toggle {
    position: absolute;
    top: 0.45rem;
    right: 0;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    background: transparent;
    color: #0B2F5C;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.samveg-mobile-submenu-toggle:hover,
.samveg-mobile-submenu-toggle:focus-visible {
    background: #eff6ff;
    color: #2563EB;
    outline: none;
}

.samveg-mobile-menu li.submenu-open > .samveg-mobile-submenu-toggle {
    transform: rotate(180deg);
}


/* ======================================================================
   SAMVEG CONTACT PAGE TEMPLATE
   Styles both the native theme form and Contact Form 7 output.
====================================================================== */

.samveg-contact-card {
    background: #ffffff;
    border: 1px solid rgba(11, 47, 92, 0.08);
    border-radius: 1rem;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
}

.samveg-contact-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    color: #0B2F5C;
    flex-shrink: 0;
}

.samveg-contact-form-wrap label,
.samveg-contact-form-wrap .wpcf7-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.45rem;
}

.samveg-contact-form-wrap input[type="text"],
.samveg-contact-form-wrap input[type="email"],
.samveg-contact-form-wrap input[type="tel"],
.samveg-contact-form-wrap input[type="url"],
.samveg-contact-form-wrap textarea,
.samveg-contact-form-wrap select,
.samveg-contact-form-wrap .wpcf7-form-control:not(.wpcf7-submit):not(.wpcf7-acceptance) {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.875rem;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #0f172a;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.samveg-contact-form-wrap textarea,
.samveg-contact-form-wrap .wpcf7-textarea {
    min-height: 150px;
    resize: vertical;
}

.samveg-contact-form-wrap input:focus,
.samveg-contact-form-wrap textarea:focus,
.samveg-contact-form-wrap select:focus,
.samveg-contact-form-wrap .wpcf7-form-control:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.samveg-contact-form-wrap .wpcf7-form p {
    margin-bottom: 1rem;
}

.samveg-contact-form-wrap .wpcf7-submit,
.samveg-contact-submit {
    appearance: none;
    border: 0;
    border-radius: 9999px;
    background: linear-gradient(135deg, #0B2F5C 0%, #2563EB 100%);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.95rem 1.5rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.samveg-contact-form-wrap .wpcf7-submit:hover,
.samveg-contact-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.samveg-contact-form-wrap .wpcf7-spinner {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.75rem;
}

.samveg-contact-form-wrap .wpcf7-not-valid-tip {
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.samveg-contact-alert {
    border-radius: 1rem;
    padding: 1rem 1.15rem;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.samveg-contact-alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.samveg-contact-alert--error {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.samveg-contact-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
    border-radius: 0.875rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.samveg-contact-quick-link:hover {
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.samveg-contact-form-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .samveg-contact-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ======================================================================
   LAYOUT WIDTH TUNING + HEADER CTA + ATTACHED FILE BOX
====================================================================== */

@media (min-width: 1024px) {
    .prose-samveg {
        font-size: 1.02rem;
    }
}

.prose-samveg {
    max-width: none;
}

.samveg-primary-menu {
    gap: 1.5rem;
}

.samveg-primary-menu > li > a {
    font-size: 12px;
}

.samveg-top-contact a {
    color: inherit;
}

.samveg-file-link-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.1rem;
    margin: 1.5rem 0;
    border: 1px solid #dbeafe;
    border-radius: 1rem;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.samveg-file-link-box__meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 280px;
}

.samveg-file-link-box__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 168, 0, 0.1);
    color: #14A800;
    font-size: 1rem;
    flex-shrink: 0;
}

.samveg-file-link-box__eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.samveg-file-link-box__title {
    display: block;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
    word-break: break-word;
}

.samveg-file-link-box__action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    border-radius: 9999px;
    background: #14A800;
    color: #ffffff !important;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.samveg-file-link-box__action:hover {
    background: #108A00;
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .samveg-file-link-box {
        align-items: flex-start;
    }

    .samveg-file-link-box__action {
        width: 100%;
        justify-content: center;
    }
}
