/*
Theme Name: Delta 7 Academy
Theme URI: https://delta7academy.com
Author: Delta 7 Academy
Author URI: https://delta7academy.com
Description: A heavy, feature-rich WordPress theme custom-built for Delta 7 Academy - an institute offering tuition, special coaching, IAS foundation and police exam classes. Includes 5 unique page layouts (Home, About, Courses, Faculty, Contact), custom post types, widgets, theme customizer options, and a fully responsive design.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: delta7
Tags: education, institute, coaching, custom-colors, custom-menu, custom-logo, featured-images, full-width-template, responsive, footer-widgets, sticky-post, threaded-comments, translation-ready
*/

/* =========================================================
   CSS RESET & ROOT VARIABLES
   ========================================================= */
:root {
    --delta-red:         #c8102e;
    --delta-red-dark:    #8b0a1f;
    --delta-red-light:   #e63946;
    --delta-gold:        #ffc72c;
    --delta-gold-dark:   #e6b020;
    --delta-cream:       #fff8e1;
    --delta-white:       #ffffff;
    --delta-dark:        #1a1a1a;
    --delta-gray:        #555555;
    --delta-light-gray:  #f5f5f5;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.18);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 28px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Poppins', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--delta-dark);
    background: var(--delta-white);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.6em;
    color: var(--delta-red-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

p { margin-bottom: 1em; color: var(--delta-gray); }

a { color: var(--delta-red); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--delta-gold-dark); }

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

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* =========================================================
   BUTTONS
   ========================================================= */
.d7-btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--delta-red);
    color: var(--delta-white);
    border: 2px solid var(--delta-red);
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.d7-btn:hover {
    background: var(--delta-gold);
    color: var(--delta-red-dark);
    border-color: var(--delta-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.d7-btn-outline {
    background: transparent;
    color: var(--delta-white);
    border-color: var(--delta-white);
}
.d7-btn-outline:hover {
    background: var(--delta-white);
    color: var(--delta-red);
    border-color: var(--delta-white);
}
.d7-btn-gold {
    background: var(--delta-gold);
    color: var(--delta-red-dark);
    border-color: var(--delta-gold);
}
.d7-btn-gold:hover {
    background: var(--delta-red);
    color: var(--delta-white);
    border-color: var(--delta-red);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: linear-gradient(135deg, var(--delta-red) 0%, var(--delta-red-dark) 100%);
    box-shadow: var(--shadow-md);
}
/* Top bar removed by request — phone/time/location relocated to footer & contact page */

.main-header { padding: 14px 0; }
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-branding { display: flex; align-items: center; gap: 16px; }
.site-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: transform 0.3s ease;
}
.site-logo-link:hover { transform: scale(1.05); }
.site-logo-img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25));
}
.custom-logo {
    max-height: 55px;
    width: auto;
    display: block;
}
.branding-text { display: flex; flex-direction: column; justify-content: center; }
.site-title {
    color: var(--delta-white);
    font-size: 1.6rem;
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 900;
    letter-spacing: 1px;
}
.site-title a { color: inherit; }
.site-tagline {
    color: var(--delta-gold);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
}
.main-nav a {
    color: var(--delta-white);
    padding: 10px 16px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: var(--delta-gold);
    color: var(--delta-red-dark);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--delta-white);
    color: var(--delta-white);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: linear-gradient(135deg, var(--delta-red-dark) 0%, #5a0716 100%);
    color: var(--delta-white);
    padding: 70px 0 0;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: var(--delta-gold);
    border-radius: 50%;
    opacity: 0.08;
}
.footer-widgets {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 50px;
}
.footer-widget h4 {
    color: var(--delta-gold);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255,199,44,0.3);
    position: relative;
}
.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 50px; height: 2px;
    background: var(--delta-gold);
}
.footer-widget p, .footer-widget li { color: rgba(255,255,255,0.85); }
.footer-widget ul { list-style: none; }
.footer-widget ul li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}
.footer-widget ul li::before {
    content: '➤';
    position: absolute;
    left: 0;
    color: var(--delta-gold);
    font-size: 0.8rem;
}
.footer-widget a { color: rgba(255,255,255,0.85); }
.footer-widget a:hover { color: var(--delta-gold); padding-left: 5px; }
.footer-contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: flex-start;
}
.footer-contact-item .icon {
    width: 36px; height: 36px;
    background: var(--delta-gold);
    color: var(--delta-red-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: bold;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 22px 0;
    text-align: center;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.2);
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: 80px 0; }
.section-title-wrap {
    text-align: center;
    margin-bottom: 60px;
}
.section-subtitle {
    color: var(--delta-red);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
    display: inline-block;
    padding: 6px 16px;
    background: rgba(200,16,46,0.08);
    border-radius: 50px;
}
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--delta-red-dark);
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    display: block;
    width: 80px; height: 4px;
    background: var(--delta-gold);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* =========================================================
   PAGE BANNER
   ========================================================= */
.page-banner {
    background: linear-gradient(135deg, var(--delta-red) 0%, var(--delta-red-dark) 100%);
    color: var(--delta-white);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-banner::before, .page-banner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--delta-gold);
    opacity: 0.1;
}
.page-banner::before { width: 300px; height: 300px; top: -150px; left: -100px; }
.page-banner::after { width: 200px; height: 200px; bottom: -100px; right: -50px; }
.page-banner h1 { color: var(--delta-white); margin-bottom: 15px; }
.page-banner .breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    color: rgba(255,255,255,0.85);
}
.page-banner .breadcrumb a { color: var(--delta-gold); }

/* =========================================================
   CARDS — generic
   ========================================================= */
.d7-card {
    background: var(--delta-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    transition: var(--transition);
    border: 2px solid transparent;
}
.d7-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--delta-gold);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 992px) {
    .footer-widgets { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--delta-red-dark);
        padding: 20px;
        display: none;
    }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav a { display: block; padding: 12px 16px; }
    .footer-widgets { grid-template-columns: 1fr; }
    .section { padding: 50px 0; }
}

/* =========================================================
   12. Back to Top Button
   ========================================================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--d7-red, #c8102e), var(--d7-dark-red, #8b0a1f));
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 8px 20px rgba(200, 16, 46, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 998;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--d7-gold, #ffc72c);
    color: var(--d7-dark-red, #8b0a1f);
    transform: translateY(-5px);
}

/* =========================================================
   13. Reveal-on-scroll
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   14. Body menu-open lock for mobile
   ========================================================= */
body.menu-open {
    overflow: hidden;
}

/* =========================================================
   15. Sticky header on scroll
   ========================================================= */
.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
}
