/* Responsive CSS for Admission Window */

/* Mobile First Approach - Base styles for mobile */

/* Global Responsive Styles */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

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

/* Container Responsiveness */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Form Responsiveness */
.form-control,
.select2-container {
    width: 100% !important;
}

.input-group {
    flex-wrap: nowrap;
}

.input-group-prepend .form-control {
    border-radius: 0.25rem 0 0 0.25rem;
}

/* Card Responsiveness */
.card {
    margin: 15px;
    width: calc(100% - 30px);
}

@media (max-width: 576px) {
    .card {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Navigation Responsiveness */
.horizontal-menu {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.horizontalMenu-list {
    display: flex;
    flex-wrap: wrap;
}

.horizontalMenu-list > li {
    flex: 0 0 auto;
}

/* Mega Menu Responsiveness */
.horizontal-megamenu {
    position: static !important;
    width: 100%;
}

@media (max-width: 991px) {
    .horizontal-megamenu .row {
        flex-direction: column;
    }
    
    .horizontal-megamenu .col {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Form Page Specific Styles */
.justify-content-center {
    padding: 0 15px;
}

/* Country Code Input Fix */
.country-code-input {
    width: 70px !important;
    min-width: 70px;
}

.phone_number {
    flex: 1;
}

/* Select2 Responsive Fix */
.select2-container--default .select2-selection--multiple {
    min-height: 38px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    margin-top: 5px;
}

/* Footer Responsiveness */
footer .row {
    margin-right: -15px;
    margin-left: -15px;
}

footer .col-lg-3,
footer .col-lg-2,
footer .col-lg-4 {
    padding-right: 15px;
    padding-left: 15px;
    margin-bottom: 30px;
}

/* Button Responsiveness */
.btn {
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    white-space: normal;
}

.btn-block {
    width: 100%;
}

/* Text and Typography Responsiveness */
h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.1rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

/* Table Responsiveness */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Background Image Responsiveness */
.cover-image,
.bannerimg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .card {
        margin: 20px auto;
        max-width: 600px;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.75rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .horizontal-menu {
        overflow-x: visible;
    }
    
    .horizontal-megamenu {
        position: absolute !important;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2.25rem;
    }
    
    h3 {
        font-size: 2rem;
    }
}

/* Fix for Scholarship Form Page */
.row.justify-content-center {
    margin: 0;
}

.row.justify-content-center > .col-md-6 {
    padding: 0;
}

/* Mobile Menu Toggle Fix */
@media (max-width: 991px) {
    #horizontal-navtoggle {
        display: block;
    }
    
    .horizontal-main {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .horizontal-main.show {
        display: block;
    }
    
    .horizontalMenu-list {
        flex-direction: column;
    }
    
    .horizontalMenu-list > li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }
}

/* Form Elements Mobile Optimization */
@media (max-width: 576px) {
    .input-group-prepend {
        margin-right: 0;
    }
    
    .form-group label {
        font-size: 0.875rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* Fix Overflow Issues */
.row {
    margin-right: -15px;
    margin-left: -15px;
}

.col, [class*="col-"] {
    padding-right: 15px;
    padding-left: 15px;
}

/* Utility Classes for Mobile */
@media (max-width: 576px) {
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
}

/* Fix Header Icons on Mobile */
.header-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.header-icons-link {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-icons-link li {
    margin-left: 15px;
}

@media (max-width: 576px) {
    .header-icons-link li {
        margin-left: 10px;
    }
    
    .header-icons-link1 {
        font-size: 1.2rem;
    }
}

/* Sticky Header Mobile Fix */
.sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
}

/* Gallery Responsiveness */
.gallery-area .gallery-single-item {
    margin-bottom: 15px;
}

/* Course Cards Responsiveness */
.Courses-area-02 .courses-r-margin-bottom {
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .Courses-area-02 .single-courses {
        margin-bottom: 20px;
    }
}

/* Welcome Area Responsiveness */
.Welcome-area .wel-text-box {
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .Welcome-area .row {
        display: block;
    }
}

/* Fix for Long Select Options */
.select2-results__option {
    white-space: normal;
    word-wrap: break-word;
}

/* Ensure Proper Spacing on Mobile */
section {
    padding: 40px 0;
}

@media (min-width: 768px) {
    section {
        padding: 60px 0;
    }
}

@media (min-width: 992px) {
    section {
        padding: 80px 0;
    }
}

/* Fix Z-index Issues */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

/* Accessibility Improvements */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #ec296b;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .no-print,
    .header-main,
    footer,
    .sticky {
        display: none !important;
    }
}