/* Enhanced Responsive Design for Ali Obaid Al Shamsi Website */

/* Mobile-First Responsive Design */
/* Base mobile styles (320px and up) */
* {
    box-sizing: border-box;
}

/* Typography scaling for mobile */
html {
    font-size: 14px; /* Base font size for mobile */
}

@media (min-width: 768px) {
    html {
        font-size: 16px; /* Larger base font for tablets */
    }
}

@media (min-width: 1024px) {
    html {
        font-size: 18px; /* Largest base font for desktop */
    }
}

/* Enhanced Mobile Navigation */
.mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 42, 67, 1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translateX(100%);
    -webkit-transition: -webkit-transform 0.3s ease-in-out;
    /* Safari-specific fixes */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* Ensure mobile menu background is always visible */
#mobile-menu {
    background: rgba(16, 42, 67, 1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#mobile-menu > div {
    background: rgba(16, 42, 67, 1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Ensure mobile menu works on all devices */
@media (max-width: 1023px) {
    .mobile-menu {
        display: block !important;
    }
    
    .mobile-menu.translate-x-0 {
        transform: translateX(0);
        -webkit-transform: translateX(0);
        -ms-transform: translateX(0);
    }
    
    .mobile-menu.translate-x-full {
        transform: translateX(100%);
        -webkit-transform: translateX(100%);
        -ms-transform: translateX(100%);
    }
}

/* Safari-specific mobile menu fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .mobile-menu {
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
    }
    
    .mobile-menu.translate-x-0 {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    .mobile-menu.translate-x-full {
        -webkit-transform: translate3d(100%, 0, 0);
        transform: translate3d(100%, 0, 0);
    }
}

/* Better mobile menu for iOS */
@supports (-webkit-touch-callout: none) {
    .mobile-menu {
        background: rgba(16, 42, 67, 1);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        height: -webkit-fill-available !important;
        min-height: -webkit-fill-available !important;
        max-height: -webkit-fill-available !important;
    }
    
    /* Fix for iOS Safari viewport height */
    html, body {
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }
}

.mobile-menu.translate-x-0 {
    transform: translateX(0);
    -webkit-transform: translateX(0);
    -ms-transform: translateX(0);
}

.mobile-menu.translate-x-full {
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
    -ms-transform: translateX(100%);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
        -webkit-transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        -webkit-transform: translateY(0);
    }
}

@-webkit-keyframes slideIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(-20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
    }
}

.mobile-menu nav {
    padding: 2rem 1.5rem;
}

.mobile-menu a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: white !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.mobile-menu a:hover {
    color: #f59e0b !important;
    padding-left: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Ensure mobile menu text is always visible */
#mobile-menu * {
    color: white !important;
}

#mobile-menu a {
    color: white !important;
}

#mobile-menu button {
    color: white !important;
}

#mobile-menu span {
    color: white !important;
}

/* Mobile menu content styles */
.mobile-menu .flex-1 {
    flex: 1;
    overflow-y: auto;
}

.mobile-menu .space-y-6 > div {
    margin-bottom: 1.5rem;
}

.mobile-menu .space-y-4 > a {
    margin-bottom: 1rem;
}

.mobile-menu button {
    background: transparent;
    border: none;
    color: white !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu button:hover {
    color: #f59e0b !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu Toggle Button */
#mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px;
}

/* Enhanced mobile menu toggle for better touch targets */
@media (max-width: 767px) {
    #mobile-menu-toggle {
        width: 48px;
        height: 48px;
        padding: 10px;
    }
    
    #mobile-menu-toggle span {
        width: 20px;
        height: 2px;
    }
}

/* Active state for mobile menu toggle */
#mobile-menu-toggle.active {
    background-color: rgba(16, 42, 67, 0.95) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#mobile-menu-toggle.active span {
    background-color: white !important;
}

/* Enhanced mobile menu toggle for better visibility */
#mobile-menu-toggle {
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

#mobile-menu-toggle:hover {
    background-color: rgba(16, 42, 67, 0.1);
    border-color: rgba(16, 42, 67, 0.2);
}

#mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #102a43;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

#mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

#mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

#mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hide mobile menu on desktop */
@media (min-width: 1024px) {
    #mobile-menu-toggle,
    .mobile-menu,
    #mobile-menu-overlay {
        display: none !important;
    }
}

/* Mobile menu overlay styles */
#mobile-menu-overlay {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.3s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
}

#mobile-menu-overlay.opacity-0 {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

#mobile-menu-overlay.opacity-100 {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Enhanced overlay for iOS */
@supports (-webkit-touch-callout: none) {
    #mobile-menu-overlay {
        background-color: rgba(0, 0, 0, 0.85);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* Ensure overlay works on all mobile devices */
@media (max-width: 1023px) {
    #mobile-menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
        background-color: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 40;
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    }
    
    #mobile-menu-overlay.opacity-0 {
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
    }
    
    #mobile-menu-overlay.opacity-100 {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }
}

/* Android-specific overlay fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    #mobile-menu-overlay {
        background-color: rgba(0, 0, 0, 0.8) !important;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Enhanced Header Responsiveness */
.header-container {
    position: relative;
    z-index: 100;
}

@media (max-width: 767px) {
    .header-container {
        padding: 0.5rem 1rem;
    }
    
    .logo-container {
        flex: 1;
    }
    
    .logo-container img {
        height: 2.5rem;
    }
    
    .nav-desktop {
        display: none;
    }
    
    .mobile-nav-controls {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
}

/* Responsive Grid System */
.responsive-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

/* Extra Small devices (320px and up) */
@media (min-width: 320px) {
    .responsive-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
        line-height: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
}

/* Small devices (375px and up) */
@media (min-width: 375px) {
    .responsive-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 2.25rem;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 2.25rem;
    }
}

/* Medium devices (414px and up) */
@media (min-width: 414px) {
    .responsive-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    h1 {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
        line-height: 2.5rem;
    }
}

/* Large phones (640px and up) */
@media (min-width: 640px) {
    .responsive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-section {
        padding: 3rem 0;
    }
}

/* Tablets (768px and up) */
@media (min-width: 768px) {
    .responsive-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    h1 {
        font-size: 3rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-section {
        padding: 4rem 0;
    }
}

/* Small laptops (1024px and up) */
@media (min-width: 1024px) {
    .responsive-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Responsive Cards */
.responsive-card {
    background: rgba(16, 42, 67, 0.98);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: white;
}

/* Service Cards Specific Styling */
.responsive-card h3 {
    color: white !important;
    font-weight: 600;
}

.responsive-card p {
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.6;
}

.responsive-card .lang-content {
    color: inherit !important;
}

/* Service card icon containers */
.responsive-card .bg-white\/20 {
    background-color: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 375px) {
    .responsive-card {
        padding: 1.25rem;
    }
}

@media (min-width: 414px) {
    .responsive-card {
        padding: 1.5rem;
    }
}

@media (min-width: 768px) {
    .responsive-card {
        padding: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .responsive-card {
        padding: 2rem;
    }
}

.responsive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.3);
    background: rgba(16, 42, 67, 1);
}

/* Responsive Typography */
.responsive-text {
    font-size: 0.875rem;
    line-height: 1.6;
}

@media (min-width: 375px) {
    .responsive-text {
        font-size: 0.9rem;
    }
}

@media (min-width: 414px) {
    .responsive-text {
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) {
    .responsive-text {
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .responsive-text {
        font-size: 1.1rem;
    }
}

.responsive-heading {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (min-width: 375px) {
    .responsive-heading {
        font-size: 1.5rem;
    }
}

@media (min-width: 414px) {
    .responsive-heading {
        font-size: 1.75rem;
    }
}

@media (min-width: 640px) {
    .responsive-heading {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .responsive-heading {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .responsive-heading {
        font-size: 2.5rem;
    }
}

/* Responsive Images */
.responsive-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Responsive Buttons */
.responsive-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 44px;
}

@media (min-width: 375px) {
    .responsive-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 414px) {
    .responsive-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) {
    .responsive-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: 48px;
    }
}

/* Responsive Forms */
.responsive-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.responsive-form input,
.responsive-form textarea,
.responsive-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
    min-height: 44px;
}

@media (min-width: 375px) {
    .responsive-form input,
    .responsive-form textarea,
    .responsive-form select {
        font-size: 0.9rem;
    }
}

@media (min-width: 414px) {
    .responsive-form input,
    .responsive-form textarea,
    .responsive-form select {
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) {
    .responsive-form input,
    .responsive-form textarea,
    .responsive-form select {
        font-size: 1rem;
        min-height: 48px;
    }
}

.responsive-form input:focus,
.responsive-form textarea:focus,
.responsive-form select:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Responsive Tables */
.responsive-table {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.responsive-table table {
    width: 100%;
    border-collapse: collapse;
}

.responsive-table th,
.responsive-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 767px) {
    .responsive-table th,
    .responsive-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* Responsive Spacing */
.responsive-section {
    padding: 1.5rem 1rem;
}

@media (min-width: 375px) {
    .responsive-section {
        padding: 2rem 1rem;
    }
}

@media (min-width: 414px) {
    .responsive-section {
        padding: 2.5rem 1rem;
    }
}

@media (min-width: 768px) {
    .responsive-section {
        padding: 4rem 2rem;
    }
}

@media (min-width: 1024px) {
    .responsive-section {
        padding: 6rem 2rem;
    }
}

/* Responsive Container */
.responsive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Enhanced breakpoints for all screen sizes */
@media (min-width: 320px) {
    .responsive-container {
        padding: 0 1rem;
    }
}

@media (min-width: 375px) {
    .responsive-container {
        padding: 0 1.25rem;
    }
}

@media (min-width: 414px) {
    .responsive-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 768px) {
    .responsive-container {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .responsive-container {
        padding: 0 2.5rem;
    }
}

/* Responsive Hero Section */
.responsive-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem 1rem;
}

@media (min-width: 375px) {
    .responsive-hero {
        min-height: 55vh;
        padding: 2rem 1rem;
    }
}

@media (min-width: 414px) {
    .responsive-hero {
        min-height: 60vh;
        padding: 2.5rem 1rem;
    }
}

@media (min-width: 768px) {
    .responsive-hero {
        min-height: 70vh;
        padding: 3rem 2rem;
    }
}

@media (min-width: 1024px) {
    .responsive-hero {
        min-height: 80vh;
        padding: 4rem 2rem;
    }
}

/* Responsive Footer */
.responsive-footer {
    background: #102a43;
    color: white;
    padding: 1.5rem 1rem;
}

@media (min-width: 375px) {
    .responsive-footer {
        padding: 2rem 1rem;
    }
}

@media (min-width: 414px) {
    .responsive-footer {
        padding: 2.5rem 1rem;
    }
}

@media (min-width: 768px) {
    .responsive-footer {
        padding: 3rem 2rem;
    }
}

@media (min-width: 1024px) {
    .responsive-footer {
        padding: 4rem 2rem;
    }
}

/* Responsive Language Dropdown */
@media (max-width: 767px) {
    .lang-dropdown {
        position: relative;
        width: 100%;
    }
    
    .lang-dropdown-content {
        position: absolute;
        right: 0;
        top: 100%;
        min-width: 200px;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .lang-button {
        width: 100%;
        justify-content: space-between;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .lang-option {
        padding: 12px 16px;
        font-size: 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}

/* Responsive Testimonials */
.testimonial-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 375px) {
    .testimonial-grid {
        gap: 1.25rem;
    }
}

@media (min-width: 414px) {
    .testimonial-grid {
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .testimonial-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Responsive Services Grid */
.services-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 375px) {
    .services-grid {
        gap: 1.25rem;
    }
}

@media (min-width: 414px) {
    .services-grid {
        gap: 1.5rem;
    }
}

@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .services-grid {
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Responsive Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Enhanced responsive form inputs */
.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Mobile-specific form improvements */
@media (max-width: 767px) {
    .form-input, .form-textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1rem;
    }
    
    .contact-form {
        padding: 0 0.5rem;
    }
}

@media (min-width: 375px) {
    .contact-form {
        padding: 0 1.25rem;
    }
}

@media (min-width: 414px) {
    .contact-form {
        padding: 0 1.5rem;
    }
}

@media (min-width: 768px) {
    .contact-form {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .contact-form {
        padding: 0 2.5rem;
    }
}

/* Responsive Blog Grid */
.blog-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 375px) {
    .blog-grid {
        gap: 1.75rem;
    }
}

@media (min-width: 414px) {
    .blog-grid {
        gap: 2rem;
    }
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

/* Responsive Team Grid */
.team-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 375px) {
    .team-grid {
        gap: 1.75rem;
    }
}

@media (min-width: 414px) {
    .team-grid {
        gap: 2rem;
    }
}

@media (min-width: 640px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

/* Responsive Statistics */
.stats-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 375px) {
    .stats-grid {
        gap: 1.75rem;
    }
}

@media (min-width: 414px) {
    .stats-grid {
        gap: 2rem;
    }
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Responsive Gallery */
.gallery-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 375px) {
    .gallery-grid {
        gap: 1rem;
    }
}

@media (min-width: 414px) {
    .gallery-grid {
        gap: 1.25rem;
    }
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Responsive Modal */
.responsive-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.responsive-modal-content {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

@media (min-width: 375px) {
    .responsive-modal-content {
        padding: 1.75rem;
    }
}

@media (min-width: 414px) {
    .responsive-modal-content {
        padding: 2rem;
    }
}

@media (min-width: 768px) {
    .responsive-modal-content {
        padding: 2.5rem;
    }
}

/* Responsive Loading States */
.responsive-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.responsive-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@media (min-width: 375px) {
    .responsive-loading {
        padding: 2rem;
    }
    
    .responsive-spinner {
        width: 36px;
        height: 36px;
        border-width: 3px;
    }
}

@media (min-width: 414px) {
    .responsive-loading {
        padding: 2.5rem;
    }
    
    .responsive-spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
}

@media (min-width: 768px) {
    .responsive-loading {
        padding: 3rem;
    }
    
    .responsive-spinner {
        width: 48px;
        height: 48px;
        border-width: 4px;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Utilities */
.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: block;
    }
}

.show-mobile {
    display: block;
}

@media (min-width: 768px) {
    .show-mobile {
        display: none;
    }
}

/* Enhanced responsive utilities for all screen sizes */
.hide-xs {
    display: none;
}

@media (min-width: 375px) {
    .hide-xs {
        display: block;
    }
}

.show-xs {
    display: block;
}

@media (min-width: 375px) {
    .show-xs {
        display: none;
    }
}

.hide-sm {
    display: none;
}

@media (min-width: 414px) {
    .hide-sm {
        display: block;
    }
}

.show-sm {
    display: block;
}

@media (min-width: 414px) {
    .show-sm {
        display: none;
    }
}

.hide-md {
    display: none;
}

@media (min-width: 768px) {
    .hide-md {
        display: block;
    }
}

.show-md {
    display: block;
}

@media (min-width: 768px) {
    .show-md {
        display: none;
    }
}

.hide-lg {
    display: none;
}

@media (min-width: 1024px) {
    .hide-lg {
        display: block;
    }
}

.show-lg {
    display: block;
}

@media (min-width: 1024px) {
    .show-lg {
        display: none;
    }
}

/* Responsive Print Styles */
@media print {
    .mobile-menu,
    .mobile-menu-toggle,
    .lang-dropdown,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .responsive-container {
        max-width: none;
        padding: 0;
    }
    
    .responsive-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
        page-break-inside: avoid;
    }
    
    .responsive-section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    .responsive-hero {
        min-height: auto;
        padding: 1rem 0;
    }
    
    .responsive-footer {
        background: none !important;
        color: #000 !important;
        padding: 1rem 0;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .mobile-menu {
        transition: none !important;
    }
    
    .responsive-card {
        transition: none !important;
    }
    
    .responsive-btn {
        transition: none !important;
    }
}

/* Focus styles for better accessibility */
.responsive-btn:focus,
.responsive-form input:focus,
.responsive-form textarea:focus,
.responsive-form select:focus,
#mobile-menu-toggle:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* Better touch targets for mobile */
@media (max-width: 767px) {
    .responsive-btn,
    .lang-button,
    #mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
    
    .lang-option {
        min-height: 48px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .responsive-card {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }
    
    .responsive-btn {
        border: 2px solid currentColor;
        background: #fff;
        color: #000;
    }
    
    .mobile-menu {
        background: #000;
        color: #fff;
    }
    
    .lang-dropdown-content {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .responsive-card {
        background: #1f2937;
        color: #f9fafb;
        border-color: #374151;
    }
    
    .responsive-form input,
    .responsive-form textarea,
    .responsive-form select {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }
    
    .lang-dropdown-content {
        background: #1f2937;
        color: #f9fafb;
        border-color: #374151;
    }
    
    .lang-option:hover {
        background-color: #374151;
    }
    
    .mobile-menu {
        background: rgba(16, 42, 67, 0.98);
    }
}

/* Enhanced mobile touch targets */
@media (max-width: 767px) {
    button, a, input, select, textarea {
        min-height: 44px; /* iOS recommended touch target size */
    }
    
    .btn-primary, .btn-secondary, .btn-gold {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        font-weight: 500;
    }
    
    /* Improve mobile navigation */
    .mobile-menu a {
        padding: 1.25rem 0;
        font-size: 1.125rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    .mobile-menu a:last-child {
        border-bottom: none;
    }
    
    /* Better mobile spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .py-32 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* iOS-specific improvements */
@supports (-webkit-touch-callout: none) {
    .mobile-menu {
        background: rgba(16, 42, 67, 0.98) !important;
        -webkit-backdrop-filter: blur(20px);
    }
    
    #mobile-menu {
        background: rgba(16, 42, 67, 0.98) !important;
        -webkit-backdrop-filter: blur(20px);
    }
    
    #mobile-menu > div {
        background: rgba(16, 42, 67, 0.98) !important;
        -webkit-backdrop-filter: blur(20px);
    }
    
    #mobile-menu-overlay {
        background-color: rgba(0, 0, 0, 0.85) !important;
        -webkit-backdrop-filter: blur(8px);
    }
    
    /* Prevent zoom on input focus */
    input, select, textarea {
        font-size: 16px;
    }
}

/* Android-specific improvements */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .mobile-menu {
        background: rgba(16, 42, 67, 0.98) !important;
    }
    
    #mobile-menu {
        background: rgba(16, 42, 67, 0.98) !important;
    }
    
    #mobile-menu > div {
        background: rgba(16, 42, 67, 0.98) !important;
    }
    
    #mobile-menu-overlay {
        background-color: rgba(0, 0, 0, 0.8) !important;
    }
}

/* Final responsive utilities */
.responsive-section {
    padding: 2rem 0;
}

.responsive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.responsive-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.responsive-text {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Service Cards Grid Improvements */
.services-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 640px) {
    .services-grid {
        gap: 2rem;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (min-width: 768px) {
    .services-grid {
        gap: 2.5rem;
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (min-width: 1024px) {
    .services-grid {
        gap: 3rem;
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    }
}

/* Responsive print styles */
@media print {
    .mobile-menu,
    #mobile-menu-toggle,
    #mobile-menu-overlay,
    .lang-dropdown,
    .floating-whatsapp {
        display: none !important;
    }
    
    .responsive-card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* Mobile Language Switcher Styles */
.lang-button-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(16, 42, 67, 0.1);
    border: 1px solid rgba(16, 42, 67, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.lang-button-mobile:hover {
    background: rgba(16, 42, 67, 0.2);
    border-color: rgba(16, 42, 67, 0.3);
    transform: translateY(-1px);
}

.lang-dropdown-content-mobile {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    z-index: 1000;
    margin-top: 4px;
}

.lang-dropdown-content-mobile.show {
    display: block;
    animation: fadeInDown 0.2s ease-out;
}

.lang-dropdown-content-mobile .lang-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.lang-dropdown-content-mobile .lang-option:last-child {
    border-bottom: none;
}

.lang-dropdown-content-mobile .lang-option:hover {
    background-color: #f9fafb;
}

.lang-dropdown-content-mobile .lang-option.active {
    background-color: #fef3c7;
    color: #92400e;
}

.lang-dropdown-content-mobile .lang-option .flag-emoji {
    margin-right: 8px;
    font-size: 16px;
}

.lang-dropdown-content-mobile .lang-option span:last-child {
    font-size: 14px;
    font-weight: 500;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RTL Support for mobile language dropdown */
[dir="rtl"] .lang-dropdown-content-mobile {
    right: auto;
    left: 0;
}

[dir="rtl"] .lang-dropdown-content-mobile .lang-option .flag-emoji {
    margin-right: 0;
    margin-left: 8px;
}

/* Fix for missing font files to prevent 404 errors */
@font-face {
    font-family: 'Glyphicons Halflings';
    src: local('Arial');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ytpregular';
    src: local('Arial');
    font-weight: normal;
    font-style: normal;
}