/* =================================
   RESPONSIVE OPTIMIZATION STYLES
   Enhanced responsiveness for all devices
   ================================= */

/* CSS Variables for better maintainability */
:root {
    --mobile-breakpoint: 576px;
    --tablet-breakpoint: 768px;
    --desktop-breakpoint: 992px;
    --large-desktop-breakpoint: 1200px;
    --extra-large-desktop-breakpoint: 1400px;
    
    /* Spacing variables */
    --mobile-padding: 15px;
    --tablet-padding: 20px;
    --desktop-padding: 30px;
    
    /* Font sizes */
    --mobile-font-sm: 12px;
    --mobile-font-base: 14px;
    --mobile-font-lg: 16px;
    --mobile-font-xl: 18px;
    --mobile-font-xxl: 20px;
}

/* =================================
   BASE RESPONSIVE IMPROVEMENTS
   ================================= */

/* Improve touch targets on mobile */
@media (max-width: 767px) {
    button, .btn, a.theme-btn, .nav-link {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }
    
    /* Better text readability */
    body {
        font-size: var(--mobile-font-base);
        line-height: 1.6;
    }
    
    /* Improved container padding */
    .container {
        padding-left: var(--mobile-padding);
        padding-right: var(--mobile-padding);
    }
}

/* =================================
   HEADER RESPONSIVE OPTIMIZATIONS
   ================================= */

/* Header improvements */
@media (max-width: 991px) {
    .navbar-brand img {
        width: 160px !important;
        height: auto;
    }
    
    .navbar-collapse {
        background: var(--color-white);
        border-radius: 10px;
        margin-top: 10px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .navbar-nav {
        padding: 15px 0;
    }
    
    .nav-item {
        margin: 5px 0;
    }
    
    .nav-link {
        padding: 12px 20px !important;
        border-radius: 8px;
        margin: 2px 10px;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background: var(--theme-bg-light);
        color: var(--theme-color) !important;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        width: 140px !important;
    }
    
    .navbar-toggler {
        padding: 8px 10px;
        border: 2px solid var(--theme-color);
        border-radius: 8px;
    }
    
    .navbar-toggler-mobile-icon {
        font-size: 20px;
    }
}

/* =================================
   HERO SECTION RESPONSIVE
   ================================= */

@media (max-width: 1199px) {
    .hero-single {
        padding-top: 120px;
        padding-bottom: 180px;
    }
    
    .hero-content .hero-title {
        font-size: 48px !important;
        line-height: 1.2;
    }
    
    .hero-content .hero-sub-title {
        font-size: 18px;
        letter-spacing: 3px;
    }
}

@media (max-width: 991px) {
    .hero-single {
        padding-top: 100px;
        padding-bottom: 120px;
        text-align: center;
    }
    
    .hero-content .hero-title {
        font-size: 36px !important;
        margin: 15px 0;
    }
    
    .hero-content .hero-sub-title {
        font-size: 16px;
        letter-spacing: 2px;
    }
    
    .hero-content p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 25px;
    }
    
    .hero-btn {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .hero-single {
        padding-top: 80px;
        padding-bottom: 80px;
    }
    
    .hero-content .hero-title {
        font-size: 28px !important;
        line-height: 1.3;
    }
    
    .hero-content .hero-sub-title {
        font-size: 14px;
        letter-spacing: 1px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .theme-btn {
        font-size: 13px;
        padding: 12px 16px;
        width: 100%;
        text-align: center;
    }
}

/* =================================
   CONTENT SECTIONS RESPONSIVE
   ================================= */

/* General section spacing */
@media (max-width: 991px) {
    .py-120 {
        padding: 60px 0 !important;
    }
    
    .pt-120 {
        padding-top: 60px !important;
    }
    
    .pb-120 {
        padding-bottom: 60px !important;
    }
}

@media (max-width: 576px) {
    .py-120 {
        padding: 40px 0 !important;
    }
    
    .pt-120 {
        padding-top: 40px !important;
    }
    
    .pb-120 {
        padding-bottom: 40px !important;
    }
}

/* Course/Service items */
@media (max-width: 991px) {
    .course-item,
    .service-item {
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .course-item,
    .service-item {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .course-title,
    .service-title {
        font-size: 18px !important;
        line-height: 1.4;
    }
    
    .course-text,
    .service-text {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* =================================
   ABOUT SECTION RESPONSIVE
   ================================= */

@media (max-width: 991px) {
    .about-left {
        margin-right: 0;
        margin-bottom: 40px;
    }
    
    .about-img {
        gap: 20px;
    }
    
    .about-img .img-1,
    .about-img .img-2,
    .about-img .img-3 {
        border-radius: 20px !important;
    }
}

@media (max-width: 576px) {
    .about-img {
        flex-direction: column;
        gap: 15px;
    }
    
    .about-img .col-md-6 {
        width: 100%;
    }
    
    .about-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .about-item-icon {
        margin: 0 auto 15px;
    }
    
    .about-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* =================================
   COUNTER SECTION RESPONSIVE
   ================================= */

@media (max-width: 991px) {
    .counter-box {
        margin: 20px 0;
    }
}

@media (max-width: 576px) {
    .counter-box {
        gap: 15px;
    }
    
    .counter-box .icon {
        width: 80px;
        height: 80px;
        line-height: 68px;
        font-size: 45px;
    }
    
    .counter-box .counter {
        font-size: 36px;
    }
    
    .counter-box .title {
        font-size: 16px;
        text-align: center;
    }
}

/* =================================
   DOCUMENT MANAGEMENT RESPONSIVE
   ================================= */

/* Documents page specific styles */
@media (max-width: 991px) {
    .documents-area .search-box {
        margin-bottom: 20px;
    }
    
    .sort-options {
        flex-wrap: wrap;
        gap: 10px !important;
    }
    
    .sort-options button {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 576px) {
    .document-card {
        margin-bottom: 20px;
    }
    
    .document-header {
        padding: 15px;
    }
    
    .document-title {
        font-size: 14px !important;
        line-height: 1.4;
    }
    
    .document-body {
        padding: 15px;
    }
    
    .document-description {
        font-size: 13px !important;
    }
    
    .document-meta .row {
        gap: 8px;
    }
    
    .document-meta small {
        font-size: 11px;
    }
    
    .document-footer {
        padding: 15px;
    }
    
    .theme-btn {
        font-size: 12px;
        padding: 10px 15px;
    }
}

/* =================================
   GALLERY RESPONSIVE
   ================================= */

@media (max-width: 991px) {
    .gallery-item {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .gallery-img img {
        border-radius: 20px !important;
    }
    
    .gallery-link {
        width: 50px;
        height: 50px;
        font-size: 40px;
    }
}

/* =================================
   CONTACT FORM RESPONSIVE
   ================================= */

@media (max-width: 991px) {
    .contact-wrapper {
        margin-top: 30px;
    }
    
    .contact-img {
        margin-bottom: 30px;
        padding-left: 0;
    }
    
    .contact-img::before {
        display: none;
    }
    
    .contact-img img {
        clip-path: none;
        border-radius: 15px;
    }
}

@media (max-width: 576px) {
    .contact-form {
        padding: 20px;
    }
    
    .contact-form-header h2 {
        font-size: 24px;
    }
    
    .contact-info {
        padding: 20px 15px;
        gap: 20px;
    }
    
    .contact-info-icon {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 28px;
    }
    
    .contact-info h5 {
        font-size: 18px;
    }
    
    .contact-info p {
        font-size: 14px;
    }
}

/* =================================
   FOOTER RESPONSIVE
   ================================= */

@media (max-width: 991px) {
    .footer-widget-box {
        margin-bottom: 40px;
        text-align: center;
    }
    
    .footer-logo img {
        width: 180px;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .footer-widget {
        text-align: center;
    }
    
    .footer-logo img {
        width: 160px;
        margin-bottom: 20px;
    }
    
    .footer-widget-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .footer-list {
        gap: 0.5rem;
    }
    
    .footer-contact li {
        justify-content: center;
        text-align: center;
    }
    
    .copyright .footer-menu {
        text-align: center;
        margin-top: 15px;
    }
    
    .copyright .footer-menu li {
        margin: 0 10px;
        font-size: 14px;
    }
    
    .copyright .copyright-text {
        font-size: 14px;
        text-align: center;
    }
}

/* =================================
   FORM IMPROVEMENTS
   ================================= */

@media (max-width: 576px) {
    .form-control,
    .form-select {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .form-label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
}

/* =================================
   BREADCRUMB RESPONSIVE
   ================================= */

@media (max-width: 576px) {
    .site-breadcrumb {
        padding-top: 100px;
        padding-bottom: 40px;
    }
    
    .breadcrumb-title {
        font-size: 28px !important;
        margin-bottom: 15px;
    }
    
    .breadcrumb-menu li {
        font-size: 14px;
        margin-left: 15px;
    }
}

/* =================================
   TEAM SECTION RESPONSIVE
   ================================= */

@media (max-width: 991px) {
    .team-item {
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .team-item {
        padding: 15px;
        text-align: center;
    }
    
    .team-bio h5 {
        font-size: 18px;
    }
    
    .team-bio span {
        font-size: 12px;
    }
    
    .team-social-btn {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 15px;
        display: inline-block;
    }
    
    .team-social {
        position: relative;
        right: auto;
        top: auto;
        opacity: 1;
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 15px;
    }
    
    .team-social a {
        display: inline-block;
        margin: 0;
    }
}

/* =================================
   UTILITIES & HELPERS
   ================================= */

/* Text alignment utilities */
@media (max-width: 576px) {
    .mobile-text-center {
        text-align: center !important;
    }
    
    .mobile-text-left {
        text-align: left !important;
    }
    
    .mobile-text-right {
        text-align: right !important;
    }
}

/* Spacing utilities for mobile */
@media (max-width: 576px) {
    .mobile-mt-20 { margin-top: 20px !important; }
    .mobile-mb-20 { margin-bottom: 20px !important; }
    .mobile-pt-20 { padding-top: 20px !important; }
    .mobile-pb-20 { padding-bottom: 20px !important; }
    
    .mobile-hidden { display: none !important; }
    .mobile-show { display: block !important; }
}

/* =================================
   SCROLL BEHAVIOR IMPROVEMENTS
   ================================= */

/* Smooth scrolling for all devices */
html {
    scroll-behavior: smooth;
}

/* Improve scroll performance on mobile */
@media (max-width: 768px) {
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
}

/* =================================
   ACCESSIBILITY IMPROVEMENTS
   ================================= */

/* Focus states for better accessibility */
@media (max-width: 768px) {
    a:focus,
    button:focus,
    .btn:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline: 2px solid var(--theme-color);
        outline-offset: 2px;
    }
}

/* Larger tap targets for better usability */
@media (max-width: 768px) {
    .owl-nav button,
    .owl-dots button {
        width: 44px !important;
        height: 44px !important;
    }
    
    .pagination .page-link {
        min-width: 44px;
        min-height: 44px;
        line-height: 32px;
    }
}

/* =================================
   PERFORMANCE OPTIMIZATIONS
   ================================= */

/* Optimize images for mobile */
@media (max-width: 768px) {
    img {
        height: auto;
        max-width: 100%;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Reduce animations on slower devices */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =================================
   WHATSAPP BUTTON MOBILE OPTIMIZATION
   ================================= */

@media (max-width: 576px) {
    .whatsapp-float {
        bottom: 70px !important;
        right: 10px !important;
        width: 45px !important;
        height: 45px !important;
    }
    
    .whatsapp-button {
        width: 45px !important;
        height: 45px !important;
    }
    
    .whatsapp-button i {
        font-size: 22px !important;
    }
    
    .whatsapp-text {
        font-size: 11px !important;
        padding: 5px 8px !important;
        right: 55px !important;
    }
    
    .whatsapp-float:hover .whatsapp-text {
        right: 60px !important;
    }
}

/* =================================
   PRINT STYLES
   ================================= */

@media print {
    .whatsapp-float,
    .navbar,
    .footer-area,
    #scroll-top,
    .theme-btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}
