/* ==========================================================================
   Gurukul Academy Harpalpur - Custom Styles
   ========================================================================== */

/* --- CSS Variables --- */
:root {
    --primary-color: #4b1675; /* Deep Purple */
    --primary-light: #6a2a9e;
    --primary-dark: #320d52;
    --secondary-color: #e3900b; /* Gold/Orange */
    --secondary-light: #f5a623;
    --text-main: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --transition: all 0.3s ease-in-out;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.15);
    --font-main: 'Outfit', sans-serif;
}

/* --- Global Reset & Basics --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.section {
    padding: 80px 0;
}

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

.highlight {
    color: var(--secondary-color);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.title-underline {
    height: 4px;
    width: 60px;
    background-color: var(--secondary-color);
    margin-bottom: 30px;
    border-radius: 2px;
}

.title-underline.center {
    margin: 0 auto 30px auto;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    border-color: white;
    color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* --- Header & Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
    padding: 15px 0;
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 50px;
    margin-right: 15px;
}

.logo h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0;
}

.nav-links ul {
    display: flex;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

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

/* --- Hero Section --- */
.hero {
    height: 100vh;
    min-height: 600px;
    background: url('https://images.unsplash.com/photo-1577896851231-70ef18881754?q=80&w=2070&auto=format&fit=crop') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
}

/* Decorative background video - sits behind the overlay and the text */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(75, 22, 117, 0.9) 0%, rgba(50, 13, 82, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: left;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-weight: 300;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* --- About Section --- */
.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.about-image {
    flex: 1;
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.image-placeholder:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

.mission-vision {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.mv-card {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    flex: 1;
    border-left: 4px solid var(--secondary-color);
}

.mv-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.mv-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.mv-card p {
    font-size: 0.9rem;
    margin: 0;
}

/* --- Academics Section --- */
.academics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.academic-card {
    background-color: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.academic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
    z-index: -1;
}

.academic-card:hover {
    transform: translateY(-10px);
}

.academic-card:hover::before {
    height: 100%;
}

.academic-card:hover h3,
.academic-card:hover p,
.academic-card:hover .card-icon {
    color: white;
}

.card-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    transition: var(--transition);
}

.academic-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    transition: var(--transition);
}

.academic-card p {
    color: var(--text-light);
    transition: var(--transition);
}

/* --- Gallery Section --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    height: 250px;
    background-color: #e0e0e0;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: #999;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

/* --- Slider Gallery --- */
.gallery-slider-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding-bottom: 40px; /* Space for dots */
    --gallery-height: 400px; /* Fixed height shared by every gallery image */
}
.gallery-slider-container {
    display: flex;
    transition: transform 0.4s ease-in-out;
}
/* Slides size themselves to their photo, so the strip has varying widths
   at a single uniform height. */
.gallery-slide {
    flex: 0 0 auto;
    max-width: 100%; /* never let one photo outgrow the viewport */
    box-sizing: border-box;
    padding: 0 10px;
}
.gallery-item {
    height: var(--gallery-height);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: #f0eef4;
    margin: 0;
}
.gallery-item img,
.gallery-item video {
    display: block;
    height: 100%;      /* fixed height */
    width: auto;       /* width follows the photo's own aspect ratio */
    max-width: 100%;
    object-fit: contain; /* never crop or stretch a photo */
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
/* No hover zoom on the video - it would fight with the playback controls */
.gallery-item-video {
    background: #000;
}
@media (max-width: 1023px) {
    .gallery-slider-wrapper {
        --gallery-height: 320px;
    }
}
@media (max-width: 767px) {
    .gallery-slider-wrapper {
        --gallery-height: 260px;
    }
}
@media (max-width: 479px) {
    .gallery-slider-wrapper {
        --gallery-height: 220px;
    }
}
.slider-btn {
    position: absolute;
    top: calc(50% - 20px);
    transform: translateY(-50%);
    background: rgba(75, 22, 117, 0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}
.slider-btn:hover {
    background: var(--primary-color);
}
.prev-btn { left: 10px; }
.next-btn { right: 10px; }
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(75, 22, 117, 0.25); /* visible on the white gallery background */
    cursor: pointer;
    transition: background 0.3s ease;
}
.dot.active {
    background: var(--secondary-color);
}

/* --- Admissions Section --- */
.admissions-content {
    display: flex;
    gap: 50px;
    margin-top: 40px;
}

.admission-info {
    flex: 1;
}

.process-list {
    margin-top: 20px;
}

.process-list li {
    display: flex;
    margin-bottom: 25px;
}

.step-num {
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.step-desc h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.step-desc p {
    color: var(--text-light);
}

.admission-form-container {
    flex: 1;
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.admission-form-container h3 {
    margin-bottom: 20px;
    text-align: center;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(75, 22, 117, 0.2);
}

/* Make sure [hidden] wins over any display rule (form / success panel toggle) */
[hidden] {
    display: none !important;
}

/* Inline error message inside the inquiry form */
.form-status {
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: #fdecea;
    border: 1px solid #f5c2c0;
    color: #a12622;
}

.form-status a {
    color: #a12622;
    font-weight: 600;
    text-decoration: underline;
}

/* Thank-you panel shown after a successful submission */
.form-success {
    text-align: center;
    padding: 10px 0;
    animation: fadeInUp 0.4s ease-out;
}

.form-success-icon {
    font-size: 3.5rem;
    color: #25a244;
    line-height: 1;
    margin-bottom: 15px;
}

.form-success h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.form-success p {
    color: var(--text-light);
    margin-bottom: 8px;
}

.form-success-note {
    font-weight: 600;
    color: var(--text-main) !important;
    margin-bottom: 20px !important;
}

.form-reset-link {
    display: inline-block;
    margin-top: 15px;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--primary-light);
    text-decoration: underline;
    cursor: pointer;
}

.form-reset-link:hover {
    color: var(--primary-color);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Contact Section --- */
.contact-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Span the full width of the .contact-info grid (both card columns) */
.quick-actions-row {
    grid-column: 1 / -1;
    width: 100%;
}

.quick-actions-row .contact-actions {
    margin-top: 0;
    flex-wrap: wrap;
}
.upi-dropdown-wrapper:hover .upi-qr-tooltip {
    display: block !important;
}

.contact-wrapper {
    display: flex;
    gap: 50px;
    margin-top: 40px;
}

.contact-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
}

.contact-item .icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-item p {
    color: var(--text-light);
}

.map-container {
    flex: 1;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* --- Footer --- */
footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 60px 0 0 0;
}

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

.footer-brand h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 15px;
}

.footer-brand p {
    color: #ccc;
    margin-bottom: 20px;
    max-width: 300px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-links h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #ccc;
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-bottom {
    background-color: #220938;
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    color: #999;
    font-size: 0.9rem;
    margin: 0;
}

/* --- Leadership Desks --- */
.leadership-desks {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.desk-card {
    display: flex;
    background: var(--bg-light);
    border-radius: 10px;
    padding: 20px;
    align-items: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.desk-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.desk-image {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-right: 20px;
    flex-shrink: 0;
}
.desk-info h4 {
    margin-bottom: 5px;
}
.desk-role {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}
.desk-info p {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-light);
    margin: 0;
}

/* --- Facilities --- */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
}
.facility-card {
    background: white;
    padding: 30px 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #eee;
}
.facility-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
}
.facility-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}
.facility-card h3 {
    font-size: 1.1rem;
    color: var(--text-main);
}

/* --- Achievers --- */
.achievers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.achiever-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.achiever-card:hover {
    transform: translateY(-5px);
}
.achiever-img {
    width: 100px;
    height: 100px;
    background: var(--bg-light);
    color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    margin: 0 auto 20px auto;
    border: 3px solid var(--secondary-color);
}

/* --- Policy Popup --- */
.policy-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.policy-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 8, 50, 0.65);
    animation: policyFade 0.25s ease-out;
}

.policy-modal-dialog {
    position: relative;
    background: var(--bg-white);
    width: 100%;
    max-width: 760px;
    max-height: 85vh;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: policyPop 0.25s ease-out;
}

.policy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 25px;
    background: var(--primary-color);
    color: white;
    flex-shrink: 0;
}

.policy-modal-header h3 {
    color: white;
    font-size: 1.35rem;
    margin: 0;
}

.policy-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}

.policy-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.policy-modal-body {
    padding: 25px 30px 35px;
    overflow-y: auto;
}

.policy-modal-body h4 {
    color: var(--primary-color);
    font-size: 1.05rem;
    margin: 25px 0 8px;
}

.policy-modal-body p,
.policy-modal-body li {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.policy-modal-body ul {
    list-style: disc; /* the global reset strips bullets */
    padding-left: 22px;
    margin-bottom: 15px;
}

.policy-modal-body li {
    margin-bottom: 6px;
}

.policy-modal-body a {
    color: var(--primary-light);
    text-decoration: underline;
}

.policy-modal-body strong {
    color: var(--text-main);
}

.policy-updated {
    font-size: 0.85rem !important;
    font-style: italic;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 18px;
}

/* Stops the page behind the popup from scrolling */
body.policy-open {
    overflow: hidden;
}

@keyframes policyFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes policyPop {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .policy-modal {
        padding: 0;
    }
    .policy-modal-dialog {
        max-height: 100vh;
        height: 100%;
        border-radius: 0;
    }
    .policy-modal-body {
        padding: 20px 20px 30px;
    }
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    .about-container {
        flex-direction: column;
    }
    .admissions-content {
        flex-direction: column;
    }
    .contact-wrapper {
        flex-direction: column;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        transition: var(--transition);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }
    .nav-links.active {
        left: 0;
    }
    .nav-links ul {
        flex-direction: column;
        text-align: center;
    }
    .nav-links li {
        margin: 20px 0;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    .mission-vision {
        flex-direction: column;
    }
    .contact-info {
        grid-template-columns: 1fr;
    }
}
