/**
 * Mobile Responsiveness Fixes
 * Optimized for smartphones and tablets
 */

/* ===================================
   GLOBAL FIXES
   =================================== */

/* Remove underlines from all links */
a {
    text-decoration: none !important;
}

a:hover {
    text-decoration: none !important;
}

/* Prevent horizontal scroll */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Better touch targets - minimum 44x44px */
@media (max-width: 768px) {

    a,
    button,
    .btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
    }
}

/* ===================================
   TYPOGRAPHY
   =================================== */

@media (max-width: 576px) {

    /* Smaller headings on mobile */
    h1,
    .h1 {
        font-size: 1.75rem !important;
    }

    h2,
    .h2 {
        font-size: 1.5rem !important;
    }

    h3,
    .h3 {
        font-size: 1.25rem !important;
    }

    h4,
    .h4 {
        font-size: 1.1rem !important;
    }

    /* Adjust body text */
    body,
    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Smaller lead text */
    .lead {
        font-size: 1.1rem !important;
    }
}

/* ===================================
   NAVBAR MOBILE FIXES
   =================================== */

@media (max-width: 991.98px) {
    .navbar {
        padding: 12px 0 !important;
    }

    .navbar-brand {
        font-size: 0.9rem !important;
    }

    .navbar-brand span {
        font-size: 1rem !important;
        display: none;
        /* Hide text on very small screens */
    }

    .navbar-toggler {
        padding: 8px 12px;
        font-size: 1.2rem;
        border: 2px solid rgba(0, 0, 0, .1);
    }

    .navbar-collapse {
        margin-top: 15px;
        max-height: 70vh;
        overflow-y: auto;
    }

    .nav-link {
        padding: 12px 16px !important;
        margin: 4px 0;
    }

    .dropdown-menu {
        margin-left: 20px;
    }

    .btn-accent {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }
}

/* Show brand text on slightly larger screens */
@media (min-width: 400px) and (max-width: 991.98px) {
    .navbar-brand span {
        display: inline !important;
    }
}

/* ===================================
   FOOTER MOBILE FIXES
   =================================== */

@media (max-width: 768px) {
    footer {
        padding: 40px 0 20px;
        margin-top: 40px;
    }

    .footer-top .row>div {
        margin-bottom: 30px;
        text-align: center;
    }

    .footer-logo {
        display: flex;
        justify-content: center;
    }

    .footer-title {
        text-align: center;
    }

    .footer-title:after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links,
    .footer-contact {
        text-align: center;
    }

    .footer-contact li {
        justify-content: center;
        flex-wrap: wrap;
    }

    .social-icons,
    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        text-align: center;
        padding-top: 20px;
    }

    .footer-copyright,
    .footer-credits {
        font-size: 0.85rem;
    }
}

/* ===================================
   CARDS & GRIDS
   =================================== */

@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }

    .card-body {
        padding: 1.25rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    /* Force single column on mobile */
    .row>[class*="col-"] {
        margin-bottom: 20px;
    }
}

/* ===================================
   FORMS
   =================================== */

@media (max-width: 768px) {

    .form-control,
    .form-select {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
        padding: 12px 16px;
    }

    .form-label {
        font-size: 0.95rem;
        font-weight: 600;
    }

    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }

    /* Stack form rows on mobile */
    .row>.col-md-6 {
        margin-bottom: 15px;
    }
}

/* ===================================
   SECTIONS & SPACING
   =================================== */

@media (max-width: 768px) {
    .section-padding {
        padding: 40px 0 !important;
    }

    .page-header {
        padding: 80px 0 40px !important;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Reduce margin/padding on mobile */
    .mb-5,
    .my-5 {
        margin-bottom: 2rem !important;
    }

    .mt-5,
    .my-5 {
        margin-top: 2rem !important;
    }

    .pb-5,
    .py-5 {
        padding-bottom: 2rem !important;
    }

    .pt-5,
    .py-5 {
        padding-top: 2rem !important;
    }
}

/* ===================================
   BUTTONS
   =================================== */

@media (max-width: 576px) {
    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }

    /* Stack buttons on mobile */
    .btn+.btn {
        margin-top: 10px;
        margin-left: 0 !important;
    }

    /* Full width buttons on mobile */
    .d-grid .btn,
    .btn-block {
        width: 100%;
    }
}

/* ===================================
   TABLES
   =================================== */

@media (max-width: 768px) {
    .table-responsive {
        border: 0;
    }

    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 8px !important;
    }
}

/* ===================================
   MODALS
   =================================== */

@media (max-width: 576px) {
    .modal-dialog {
        margin: 10px;
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .modal-title {
        font-size: 1.25rem;
    }
}

/* ===================================
   BACK TO TOP BUTTON
   =================================== */

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem;
    }
}

/* ===================================
   HERO SECTIONS
   =================================== */

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 !important;
    }

    .hero-title {
        font-size: 1.75rem !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .hero-logo img {
        max-width: 200px !important;
    }

    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ===================================
   BREADCRUMBS
   =================================== */

@media (max-width: 576px) {
    .breadcrumb {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .breadcrumb-item+.breadcrumb-item::before {
        padding: 0 6px;
    }
}

/* ===================================
   GALLERY
   =================================== */

@media (max-width: 768px) {
    .gallery-item {
        margin-bottom: 15px;
    }

    .gallery-filter-btn {
        font-size: 0.85rem;
        padding: 8px 16px;
        margin: 4px;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

/* Hide on mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Show only on mobile */
.show-mobile {
    display: none !important;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block !important;
    }
}

/* Text alignment on mobile */
@media (max-width: 768px) {
    .text-md-center {
        text-align: center !important;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

/* Larger tap targets for better accessibility */
@media (max-width: 768px) {

    .nav-link,
    .dropdown-item,
    .footer-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Better focus states for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #f4a261;
    outline-offset: 2px;
}