/* ==========================================================================
   Brand & Theme Variables
   Primary: White & Vibrant Blue
   Accents: Deep Red/Maroon & Warm Yellow (Matching Posters & Banners)
   ========================================================================== */
:root {
    --primary-blue: #0f52ba;
    --primary-dark: #0a3880;
    --primary-light: #eef4ff;
    
    --accent-red: #d32f2f;
    --accent-red-hover: #b71c1c;
    --accent-yellow: #fbc02d;
    --accent-yellow-light: #fffde7;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    
    --border-color: #e2e8f0;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(15, 82, 186, 0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    
    --font-family: 'Inter', 'Noto Sans Kannada', -apple-system, sans-serif;
}

/* Reset & Base Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography & Headers */
h1, h2, h3, h4 {
    color: var(--primary-dark);
    line-height: 1.25;
}

.kn-text, .kn-subtitle, .kn-sub, .brand-kn {
    font-family: 'Noto Sans Kannada', sans-serif;
}

.section {
    padding: 70px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 45px;
}

.section-subtitle {
    color: var(--accent-red);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-top: 5px;
}

.divider {
    width: 60px;
    height: 4px;
    background: var(--accent-yellow);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* Top Announcement Bar */
.top-bar {
    background-color: var(--accent-red);
    color: #ffffff;
    padding: 8px 0;
    font-size: 0.88rem;
    font-weight: 500;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.urgent-badge {
    background: var(--accent-yellow);
    color: #000;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
}

.top-phones a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 15px;
    font-weight: 600;
}

.top-phones a:hover {
    text-decoration: underline;
}

/* Header & Navbar */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

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

.brand-logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.logo-emblem {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--accent-yellow);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.logo-emblem.sm {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
}

.logo-emblem i { font-size: 1rem; }
.logo-emblem span { font-weight: 800; font-size: 0.85rem; line-height: 1; }

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-blue);
    letter-spacing: 0.5px;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.brand-kn {
    font-size: 0.75rem;
    color: var(--accent-red);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-blue);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-dark);
    cursor: pointer;
}

.mobile-only-btn { display: none; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: #fff;
}
.btn-primary:hover { background-color: var(--primary-dark); }

.btn-accent {
    background-color: var(--accent-red);
    color: #fff;
}
.btn-accent:hover { background-color: var(--accent-red-hover); }

.btn-outline {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
}
.btn-outline:hover { background-color: var(--primary-light); }

.btn-block { width: 100%; display: block; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #ffffff 0%, #f0f5ff 100%);
    padding: 60px 0 80px;
    border-bottom: 1px solid var(--border-color);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-light);
    color: var(--primary-blue);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero-content h1 {
    font-size: 2.6rem;
    margin-bottom: 12px;
}

.hero-content h1 span {
    color: var(--accent-red);
}

.hero-kn {
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 25px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.hero-highlights {
    display: flex;
    gap: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    flex-wrap: wrap;
}

.hl-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.hl-item i { color: var(--primary-blue); }

/* Hero Featured Card */
.hero-card {
    background: #fff;
    border: 2px solid var(--accent-yellow);
    border-radius: var(--radius-lg);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-red);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 16px;
    border-radius: 12px;
}

.hero-card-img {
    margin: 15px 0 10px;
}

.student-eng-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Image Styles */
.student-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-blue);
    margin: 0 auto;
    display: block;
}

.hero-topper-photo {
    width: 110px;
    height: 110px;
    border: 3px solid var(--accent-yellow);
}

.placeholder-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.2rem;
    border: 3px solid var(--primary-blue);
}

.placeholder-avatar.lg {
    width: 110px;
    height: 110px;
    font-size: 2.8rem;
}

.hero-card h3 {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.reg-no {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 10px;
}

.tags-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.tag {
    background: var(--accent-yellow-light);
    color: #856404;
    border: 1px solid #ffeeba;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.district {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-red);
}

/* Stats Bar */
.stats-bar {
    background-color: var(--primary-blue);
    color: #fff;
    padding: 30px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    gap: 20px;
}

.stat-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-yellow);
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.lead {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.kn-text {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.feature-list {
    list-style: none;
    margin-top: 15px;
}

.feature-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.feature-list i {
    color: var(--primary-blue);
    margin-top: 4px;
}

.about-box-card {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--accent-red);
}

.box-icon {
    font-size: 2rem;
    color: var(--accent-red);
    margin-bottom: 15px;
}

.address-highlight {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    gap: 10px;
    font-size: 0.88rem;
}

.address-highlight i { color: var(--accent-red); margin-top: 3px;}

/* Courses Section */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.course-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.course-card.featured {
    border: 2px solid var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.popular-ribbon {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--accent-yellow);
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 10px;
}

.class-badge {
    background: var(--primary-light);
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.course-header h3 {
    font-size: 1.3rem;
    margin: 10px 0 4px;
}

.course-header .kn-sub {
    font-size: 0.85rem;
    color: var(--accent-red);
    font-weight: 600;
    margin-bottom: 20px;
}

.course-specs {
    list-style: none;
    margin-bottom: 25px;
}

.course-specs li {
    font-size: 0.88rem;
    margin-bottom: 10px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.course-specs i { color: var(--primary-blue); margin-top: 3px; }

/* Amenities Box */
.amenities-container {
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
}

.amenities-container h3 {
    margin-bottom: 20px;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.amenity-item {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.amenity-item i {
    font-size: 1.8rem;
    color: var(--accent-red);
    margin-bottom: 10px;
}

.amenity-item h4 { font-size: 1rem; margin-bottom: 4px; }
.amenity-item p { font-size: 0.8rem; color: var(--text-muted); }

/* Results Grid & Filter */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.result-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

.result-card:hover { transform: translateY(-5px); }

.photo-wrapper { margin-bottom: 12px; }

.result-card h4 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.student-eng-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.res-info {
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
    background: var(--bg-light);
    padding: 6px;
    border-radius: 6px;
}

.cat-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
}

.cat-pill.navodaya { background: #e3f2fd; color: #0d47a1; }
.cat-pill.kittur { background: #fbe9e7; color: #d84315; }
.cat-pill.morarji { background: #fff8e1; color: #f57f17; }

.achievers-banner {
    max-width: 1050px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.achievers-banner-img {
    width: 100%;
    height: auto;
    display: block;
}

.achievers-banner-placeholder {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--primary-blue);
    background: var(--primary-light);
    font-weight: 700;
    text-align: center;
}

.achievers-banner-placeholder i {
    font-size: 2.4rem;
    color: var(--accent-red);
}

/* Founders Section */
.founders-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.founder-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.founder-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-blue);
    margin: 0 auto 15px;
    display: block;
}

.founder-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 15px;
}

.founder-card h3 { font-size: 1.2rem; }
.founder-card .role { color: var(--accent-red); font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.founder-card .org { font-size: 0.8rem; color: var(--text-muted); }

/* Gallery */
.gallery-slider {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    background: #fff;
}

.gallery-slide {
    display: none;
}

.gallery-slide.active {
    display: block;
}

.gallery-photo {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
    display: block;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(10, 56, 128, 0.86);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.gallery-nav:hover {
    background: var(--primary-dark);
}

.gallery-prev {
    left: 14px;
}

.gallery-next {
    right: 14px;
}

.gallery-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.gallery-dot.active {
    background: var(--accent-yellow);
}

.gallery-placeholder {
    height: 360px;
    background: #e2e8f0;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 10px;
}

.gallery-placeholder i { font-size: 2rem; }
.gallery-placeholder span { font-size: 0.85rem; font-weight: 600; }

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.info-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-light);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.info-card h4 { font-size: 1rem; margin-bottom: 2px; }
.info-card p { font-size: 0.88rem; color: var(--text-muted); }
.kn-text-sm { font-size: 0.8rem; color: var(--accent-red); margin-top: 2px; }

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--primary-blue);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.map-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-form-container {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.contact-form-container h3 {
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: #fff;
    padding-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo-img {
    height: 40px;
    width: auto;
}

.footer-brand h3 { color: #fff; font-size: 1.2rem; margin-top: 10px; }
.footer-brand p { font-size: 0.85rem; opacity: 0.8; }

.footer-links h4, .footer-qr h4 {
    color: var(--accent-yellow);
    margin-bottom: 15px;
    font-size: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.88rem;
    opacity: 0.8;
}

.footer-links a:hover { opacity: 1; text-decoration: underline; }

.qr-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
    border-radius: 8px;
}

.qr-placeholder {
    width: 100px;
    height: 100px;
    background: #fff;
    color: #000;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    text-align: center;
    gap: 4px;
}

.qr-placeholder i { font-size: 2.2rem; }

.footer-bottom {
    background: #062354;
    text-align: center;
    padding: 15px 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .hero-container, .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .courses-grid { grid-template-columns: 1fr 1fr; }
    .founders-grid { grid-template-columns: repeat(3, 1fr); }
    .results-grid, .amenities-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        display: none;
    }
    
    .nav-menu.active { display: flex; }
    .mobile-only-btn { display: block; width: 100%; }
    
    .courses-grid, .results-grid, .amenities-grid {
        grid-template-columns: 1fr;
    }

    .gallery-photo {
        height: 240px;
    }

    .founders-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .founder-card {
        padding: 16px 8px;
    }

    .founder-photo,
    .founder-avatar {
        width: 64px;
        height: 64px;
        margin-bottom: 10px;
    }

    .founder-card h3 { font-size: 0.82rem; }
    .founder-card .role { font-size: 0.72rem; }
    .founder-card .org { font-size: 0.65rem; }

    .hero-content h1 { font-size: 2rem; }
    .top-bar-content { flex-direction: column; text-align: center; }
}
