/* =========================================
   1. GLOBAL DEFAULTS & YII FRAMEWORK FIXES
   ========================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #f9f9f9;
    overflow-x: hidden; /* Prevent horizontal scrollbars */
}

a {
    text-decoration: none;
    transition: 0.3s;
}

/* Container for standard page width */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    height: 100%;
}

/* YII2 GRIDVIEW DEFAULTS (Keep these for admin tables) */
.grid-view th { white-space: nowrap; }
.hint-block { display: block; margin-top: 5px; color: #999; }
.error-summary {
    color: #a94442; background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px; margin: 0 0 15px 0;
}
/* Sorting Icons */
a.asc:after, a.desc:after {
    content: ''; display: inline-block;
    width: 0; height: 0; margin: 4px;
}
a.asc:after { border-bottom: solid 7px #333; border-left: 5px solid transparent; border-right: 5px solid transparent; }
a.desc:after { border-top: solid 7px #333; border-left: 5px solid transparent; border-right: 5px solid transparent; }

/* =========================================
   2. TOP UTILITY BAR
   ========================================= */
.top-utility-bar {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    padding: 6px 24px;
}

.azadi-logo { height: 28px; vertical-align: middle; margin-right: 8px; }

.utility-right a {
    margin: 0 6px;
    color: #333;
    font-weight: 500;
}

/* =========================================
   3. MAIN HEADER & NAVIGATION
   ========================================= */
.top-bar {
    background: linear-gradient(90deg, #9c2c6b, #4a148c);
    color: #fff;
    height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Logo Area */
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 45px; background: #fff; border-radius: 50%; padding: 2px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text .title { font-weight: bold; font-size: 18px; }
.logo-text .subtitle { font-size: 12px; opacity: 0.9; }

/* Menu Area */
.menu { display: flex; align-items: center; gap: 25px; }
.menu a {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 500;
}
.menu a:hover { color: #fff; }

/* Login Dropdown & Button */
.nav-item.login-dropdown { position: relative; }
.btn-login {
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex; align-items: center; gap: 5px;
}
.btn-login:hover { background: rgba(255,255,255,0.25); }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; right: 0;
    background: #fff;
    min-width: 180px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 1000;
    margin-top: 10px;
}
.login-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li { list-style: none; }
.dropdown-menu li a {
    color: #333;
    padding: 10px 16px;
    display: block;
}
.dropdown-menu li a:hover { background: #f0f6ff; color: #7b1fa2; }

.hero-banner-full {
        position: relative;
        width: 100%;
        /* No min-height or aspect-ratio here, so it stays compact */
        display: flex;
        align-items: center;
        overflow: hidden;
        height: 500px;
    }

    .banner-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        
        /* 1. PREVENT STRETCHING */
        object-fit: cover; 
        
        /* 2. FOCUS ON THE FACES 
           This anchors the image to the 'Right' (where they are) 
           and 'Center' vertically. */
        object-position: right center; 
        
        z-index: 0;
    }

    .relative-holder {
        position: relative;
        z-index: 2;
        width: 100%;
        /* Optional: Add a tiny bit of padding just to let the text breathe, 
           but not enough to make the banner huge. */
        padding: 40px 0; 
    }
.banner-slide {
    width: 100%;
    height: 100%;
    position: relative;
}



.banner-bg.active {
    opacity: 1; /* Show active image */
    z-index: 2;
}

/* Ensure Text stays on top of images */
.relative-holder {
        position: relative;
        z-index: 2; /* Ensures text sits on top of image */
        width: 100%;
    }

.banner-content {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 8px;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    pointer-events: auto; /* Re-enables clicks for the button */
    z-index: 10;
}

.banner-content h1 {
    font-size: 36px; margin: 0 0 15px 0;
    color: #333; line-height: 1.2;
}
.banner-content p {
    font-size: 16px; color: #666;
    margin-bottom: 25px;
}

/* Register Button (Fixed Overlap) */
.btn-register {
    display: inline-block;
    background: #3aa0e6;
    color: #fff !important;
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(58, 160, 230, 0.3);
}
.btn-register:hover { background: #2b8ac9; transform: translateY(-2px); }

/* =========================================
   5. STATS SECTION
   ========================================= */
.stats {
    background: #fff;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: center;
    gap: 80px;
}
.stat-box { text-align: center; }
.stat-box h2 { color: #4a148c; font-size: 32px; margin: 0; font-weight: 700; }
.stat-box p { color: #777; margin: 5px 0 0; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }

/* =========================================
   6. INFO GRID SECTION (ALIGNED)
   ========================================= */
.info-section-wrapper {
    padding: 60px 0;
    background: #fff;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Equal Columns */
    gap: 30px;
    align-items: start;
}

.info-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.box-header {
    background: #f9f9f9;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}
.box-header h3 { margin: 0; font-size: 18px; color: #333; }

.box-body { padding: 20px; flex: 1; }

.news-list { padding-left: 20px; margin: 0; }
.news-list li { margin-bottom: 10px; color: #555; }

/* Social Widget Fix (Prevents huge height) */
.social-box .scrollable-body {
    padding: 0;
    max-height: 400px; /* Limits height */
    overflow-y: auto;  /* Adds scrollbar */
}
.scrollable-body img { width: 100%; display: block; }

/* =========================================
   7. MODAL / POPUP STYLES
   ========================================= */
/* =========================================
   7. MODAL / POPUP STYLES (MATERIAL DESIGN FIX)
   ========================================= */
.modal-overlay {
    display: none;
    position: fixed; z-index: 99999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center; align-items: center;
}

.modal-card {
    background: #f0f4f8; /* Light blue-gray background */
    padding: 30px 40px;
    border-radius: 12px;
    width: 95%; max-width: 900px; /* Wide layout */
    position: relative;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown { from {top: -50px; opacity: 0;} to {top: 0; opacity: 1;} }

.close-modal {
    position: absolute; right: 20px; top: 15px;
    font-size: 28px; cursor: pointer; color: #999;
}
.close-modal:hover { color: #333; }

/* HEADER */
.modal-header-custom { text-align: center; margin-bottom: 30px; }
.modal-title { color: #3aa0e6; margin: 0; font-size: 24px; font-weight: bold; }
.modal-subtitle { color: #d9534f; font-size: 13px; margin-top: 5px; }

/* GENDER ICONS */
.form-section-top {
    display: flex; gap: 40px; margin-bottom: 20px;
}
.gender-wrapper { min-width: 200px; }
.section-label { font-size: 12px; font-weight: bold; display: block; margin-bottom: 10px; color: #333; }
.gender-options { display: flex; gap: 20px; }
.gender-opt { cursor: pointer; text-align: center; position: relative; }
.gender-opt input { position: absolute; opacity: 0; cursor: pointer; }
.g-icon { font-size: 35px; display: block; line-height: 1; filter: grayscale(100%); transition: 0.3s; }
.g-label { font-size: 11px; color: #666; display: block; margin-top: 4px; }

/* Highlight selected gender */
.gender-opt input:checked ~ .g-icon { filter: grayscale(0%); transform: scale(1.1); }
.gender-opt input:checked ~ .g-label { color: #000; font-weight: bold; }

/* MATERIAL INPUTS (Underline Style) */
.top-inputs { flex-grow: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.form-grid-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 25px 30px; }

.material-group { position: relative; margin-bottom: 5px; }

.material-input {
    width: 100%;
    padding: 10px 0;
    font-size: 14px;
    color: #333;
    border: none;
    border-bottom: 1px solid #999;
    outline: none;
    background: transparent;
    border-radius: 0; /* Remove Bootstrap radius */
}

.material-input:focus { border-bottom: 2px solid #1e2b6c; }

/* Floating Labels */
.floating-label {
    position: absolute;
    top: 10px; left: 0;
    font-size: 14px; color: #999;
    pointer-events: none;
    transition: 0.2s ease all;
    font-weight: 500;
}

/* Float label up when focused or has content */
.material-input:focus ~ .floating-label,
.material-input:not(:placeholder-shown) ~ .floating-label {
    top: -12px;
    font-size: 11px;
    color: #333;
    font-weight: bold;
}

/* DOB Row Specifics */
.dob-row { display: flex; gap: 20px; }
.dob-field { flex-grow: 2; }
.age-field { flex-grow: 1; }

/* FOOTER */
.modal-footer-custom {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e0e0e0; /* Optional divider */
    padding-top: 20px;
}
.btn-check-eligibility {
    background: #1e2b6c; color: #fff;
    border: none; padding: 12px 40px;
    border-radius: 30px; cursor: pointer; font-size: 14px;
    margin: 0 auto; /* Center button */
    display: block;
    box-shadow: 0 4px 15px rgba(30, 43, 108, 0.3);
}
.reset-link { float: right; font-size: 12px; color: #666; text-decoration: underline; }
.red { color: red; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .form-section-top { flex-direction: column; gap: 20px; }
    .top-inputs, .form-grid-custom { grid-template-columns: 1fr; }
}
/* Form Styles */
.form-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    margin-top: 20px;
}
.input-group label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 5px; }
.form-control {
    width: 100%; padding: 8px;
    border: 1px solid #ddd; border-radius: 4px;
    box-sizing: border-box; /* Fixes padding issues */
}
.modal-footer { margin-top: 25px; text-align: center; }
.btn-check {
    background: #1e2b6c; color: #fff;
    border: none; padding: 10px 40px;
    border-radius: 20px; cursor: pointer; font-size: 15px;
}

/* =========================================
   8. FOOTER
   ========================================= */
.footer {
    background: #1e2b6c;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

/* =========================================
   9. RESPONSIVE (MOBILE)
   ========================================= */
@media (max-width: 991px) {
    .info-grid { grid-template-columns: 1fr; } /* Stack cards on mobile */
    .hero-banner-full { height: auto; min-height: 400px; }
    .banner-content { position: relative; top: 0; left: 0; transform: none; margin: 20px; width: auto; }
    .banner-slide img { position: absolute; }
    .header-flex { flex-direction: column; gap: 10px; height: auto; padding: 10px; }
    .top-bar { height: auto; }
    .menu { flex-wrap: wrap; justify-content: center; }
    .stats { flex-wrap: wrap; gap: 20px; }
}

/* Add this to your CSS file */

.error-banner {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #f87171;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
    animation: shake 0.5s;
}

/* Shake animation for error */
@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* Ensure hidden UDID spans full width when visible */
#udid-group {
    margin-top: 10px;
}

/* --- REGISTRATION LAYOUT STYLES --- */
.reg-body {
    background: #f4f7f6;
    background-image: url('../images/hero-wave.svg'); /* If you have a wave bg */
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

.reg-header {
    background: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.logo-area { display: flex; align-items: center; gap: 10px; font-weight: bold; font-size: 18px; color: #7b1fa2; }
.logo-area img { height: 40px; }
.logo-area small { display: block; font-size: 12px; color: #666; font-weight: normal; }
.header-right a { color: #333; text-decoration: none; font-size: 14px; border: 1px solid #ddd; padding: 5px 15px; border-radius: 20px; }

.reg-content { flex: 1; padding: 40px 0; }

.reg-footer { text-align: center; padding: 20px; color: #666; font-size: 12px; }

/* --- FORM CARD STYLES --- */
.form-wrapper {
    background: #fff;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-header-strip {
    background: linear-gradient(90deg, #9c2c6b, #2c3e9c);
    color: #fff;
    padding: 20px 30px;
}
.form-header-strip h2 { margin: 0; font-size: 22px; }
.form-header-strip p { margin: 5px 0 0; opacity: 0.8; font-size: 13px; }

/* --- SECTIONS --- */
.form-section {
    padding: 30px;
    border-bottom: 1px solid #eee;
}
.section-title {
    color: #2c3e9c;
    font-size: 18px;
    margin-bottom: 25px;
    font-weight: 600;
}

/* --- MATERIAL GRID --- */
.row-grid { display: flex; gap: 30px; margin-bottom: 20px; }
.three-col .col-group { width: 33.33%; }
.col-group { flex: 1; position: relative; }

/* --- MATERIAL INPUTS --- */
.form-group { margin-bottom: 0; } /* Reset Yii default */
.mat-input {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    font-size: 14px;
    border-radius: 0;
    outline: none;
    transition: 0.3s;
}
.mat-input:focus { border-bottom-color: #7b1fa2; }

/* Floating Label Logic */
.mat-label {
    position: absolute;
    top: 10px; left: 0;
    color: #999;
    font-size: 14px;
    pointer-events: none;
    transition: 0.2s ease all;
    font-weight: normal;
}
.mat-input:focus ~ .mat-label,
.mat-input:not(:placeholder-shown) ~ .mat-label {
    top: -12px; font-size: 11px; color: #7b1fa2; font-weight: bold;
}

/* --- SUBMIT BUTTON --- */
.form-footer { padding: 30px; text-align: right; background: #f9f9f9; }
.btn-submit-reg {
    background: #2c3e9c;
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(44, 62, 156, 0.3);
}

@media(max-width: 768px) {
    .row-grid { flex-direction: column; gap: 20px; }
    .three-col .col-group { width: 100%; }
}

/* --- UPDATED REGISTRATION STYLES --- */
.reg-body {
    background: #f3f4f8;
    background-image: url('../images/bg-wave.png'); /* Wavy background */
    background-size: 100% auto;
    background-repeat: repeat-y;
    min-height: 100vh;
}

/* Header Adjustments */
.reg-header {
    background: #9c2c6b; /* Solid Purple header based on new image */
    background: linear-gradient(90deg, #9c2c6b, #4a148c);
    padding: 15px 0;
}
.logo-area { color: #fff; }
.logo-area small { color: rgba(255,255,255,0.8); }
.header-right a { color: #fff; border-color: rgba(255,255,255,0.3); }

/* Form Container */
.form-wrapper {
    background: transparent; /* Transparent to show waves behind */
    max-width: 1100px;
    margin: -30px auto 50px; /* Pull up to overlap header slightly if desired */
    box-shadow: none; 
}

/* Purple Strip */
.form-header-strip {
    background: #9c2c6b;
    background: linear-gradient(90deg, #9c2c6b, #2c3e9c);
    color: #fff;
    padding: 20px 30px;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* GLASS EFFECT SECTIONS */
.glass-effect {
    background: rgba(255, 255, 255, 0.85); /* Semi-transparent white */
    backdrop-filter: blur(10px); /* The Glass Blur */
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    padding: 30px;
}

.section-title {
    color: #3f51b5;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

/* Material Inputs (Refined) */
.mat-input {
    background: #f9f9f9; /* Slight grey background for inputs in screenshot */
    border-radius: 4px;
    padding: 12px 10px;
    border: 1px solid #e0e0e0;
    border-bottom: 2px solid #ccc; /* Stronger bottom border */
}
.mat-input:focus {
    background: #fff;
    border-bottom-color: #9c2c6b;
}
.mat-label {
    left: 10px;
    top: 12px;
}
.mat-input:focus ~ .mat-label,
.mat-input:not(:placeholder-shown) ~ .mat-label {
    top: -8px; 
    left: 5px;
    background: #fff; 
    padding: 0 5px;
    border-radius: 3px;
}

.red { color: #d32f2f; }

/* Submit Button */
.btn-submit-reg {
    background: linear-gradient(90deg, #9c2c6b, #2c3e9c);
    width: 200px;
    padding: 14px;
    border-radius: 30px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* --- BRANDING CONTAINER --- */
.brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    padding: 5px 0;
}

/* Emblem Image */
.gov-emblem {
    height: 55px; /* Adjust based on your logo aspect ratio */
    width: auto;
    object-fit: contain;
}

/* Text Wrapper */
.brand-text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    border-left: 1px solid rgba(255,255,255,0.2); /* Subtle separator if on dark bg */
    padding-left: 15px;
}

/* 1. Top Line: Govt of Maharashtra */
.gov-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: #fce4ec; /* Light Pink/White */
    opacity: 0.9;
    margin-bottom: 2px;
}

/* 2. Middle Line: MARATHI (Main Focus) */
.dept-title-mr {
    font-size: 20px;
    font-weight: 700;
    color: #fff; /* White for contrast on purple header */
    font-family: 'Noto Sans', 'Segoe UI', sans-serif; /* Good for Marathi */
}

/* 3. Bottom Line: ENGLISH */
.dept-title-en {
    font-size: 13px;
    font-weight: 500;
    color: #e1bee7; /* Light Purple text */
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .gov-emblem { height: 45px; }
    .brand-container { gap: 10px; }
    .brand-text-block { padding-left: 10px; }
    
    .gov-title { font-size: 9px; }
    .dept-title-mr { font-size: 16px; } /* Smaller on mobile */
    .dept-title-en { font-size: 10px; }
}


