/* =====================================================
   Masarat Al Diyar - Main Stylesheet
   Industry.sa Inspired Design - Clean White & Blue
   ===================================================== */

/* Custom Arabic Font - IBM Plex Sans Arabic */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    src: url('../fonts/IBMPlexSansArabic-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables - Clean Corporate Blue Palette */
:root {
    --primary-color: #0066cc;
    --primary-dark: #004d99;
    --primary-light: #3399ff;
    --primary-lighter: #66b3ff;
    --primary-gradient: linear-gradient(135deg, #0066cc 0%, #0099ff 50%, #00ccff 100%);
    --accent-color: #00b4d8;
    --accent-light: #48cae4;
    --accent-dark: #0096c7;
    --success-color: #10b981;
    --text-color: #1a1a2e;
    --text-light: #4a4a68;
    --text-muted: #6b7280;
    --text-lighter: #9ca3af;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --bg-blue-light: #e6f4ff;
    --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    --bg-dark: #0a1628;
    --border-color: #e2e8f0;
    --border-dark: #cbd5e1;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 2px 8px rgba(0, 102, 204, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 102, 204, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 102, 204, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 102, 204, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
    --transition: none;
    --transition-fast: none;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =====================================================
   Typography
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header .subtitle {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: block;
}

.section-header h2 {
    color: var(--text-color);
    margin-bottom: 20px;
}

.section-header p {
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* =====================================================
   Buttons - Classic Corporate Style
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}


.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-accent {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.25);
}

.btn-accent:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary-color);
    border-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.btn-white:hover {
    background: #f8fafc;
    border-color: #f8fafc;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-blue-light);
    border-color: var(--primary-light);
    color: var(--primary-color);
}

.btn-sm {
    padding: 12px 24px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 18px 48px;
    font-size: 1.1rem;
}

/* =====================================================
   Navigation - Modern Clean
   ===================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}


.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.navbar .logo img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu a {
    padding: 10px 18px;
    font-weight: 500;
    color: var(--text-light);
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a.active {
    color: var(--primary-color);
    font-weight: 600;
}


.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    z-index: 1001;
    position: relative;
}

.nav-toggle span {
    width: 26px;
    height: 2.5px;
    background: var(--text-color);
    border-radius: 3px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* =====================================================
   Hero Section - Classic Design with Background Image
   ===================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: url('../images/worker.jpg') center center / cover no-repeat;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 77, 153, 0.92) 0%, rgba(0, 102, 204, 0.88) 50%, rgba(0, 136, 204, 0.85) 100%);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(0, 180, 216, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
    padding: 0 20px;
    max-width: 900px;
}

.hero-logo {
    width: 150px;
    height: auto;
    margin-bottom: 32px;
    filter: brightness(0) invert(1);
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0;
    color: white;
    line-height: 1.3;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 550px;
    margin: 0 auto 40px;
    font-weight: 400;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.hero-scroll i {
    font-size: 1.5rem;
    color: white;
    opacity: 0.7;
}

.hero-scroll:hover i {
    opacity: 1;
}

/* =====================================================
   About Section - Clean Design
   ===================================================== */
.about-section {
    padding: 80px 0;
    background: var(--bg-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.1;
}

.section-subtitle {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

.about-content h2 {
    color: var(--text-color);
    font-size: 1.75rem;
    margin-bottom: 20px;
}

.about-content p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.8;
}

/* =====================================================
   Stats Section - Classic Blue
   ===================================================== */
.stats-section {
    padding: 70px 0;
    background: var(--primary-color);
    color: white;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-card {
    text-align: center;
    padding: 28px 20px;
}

.stat-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.stat-number span {
    font-size: 1.25rem;
    opacity: 0.8;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 400;
}

/* =====================================================
   Services Section - Classic Corporate Cards
   ===================================================== */
.services-section {
    padding: 100px 0;
    background: var(--bg-light);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    background: white;
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
}



.service-icon {
    width: 72px;
    height: 72px;
    background: var(--bg-blue-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}



.service-icon i {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.service-card h4 {
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 1.15rem;
    font-weight: 600;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.7;
}

/* =====================================================
   Projects Section - Modern Grid
   ===================================================== */
.projects-section {
    padding: 100px 0;
    background: var(--bg-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.project-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px;
    background: linear-gradient(transparent 0%, rgba(0, 77, 153, 0.9) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.project-overlay h4 {
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.project-overlay p {
    opacity: 0.9;
    font-size: 0.9rem;
    margin: 0;
}

/* =====================================================
   Certificates Section - Classic
   ===================================================== */
.certificates-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.certificate-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.certificate-card img {
    max-height: 160px;
    margin-bottom: 16px;
}

.certificate-card h4 {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 4px;
}

.certificate-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* =====================================================
   Partners Section - Clean Grid
   ===================================================== */
.partners-section {
    padding: 80px 0;
    background: var(--bg-color);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: center;
}

.partner-logo {
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    aspect-ratio: 1;
    min-height: 150px;
}

.partner-logo img {
    max-width: 90%;
    max-height: 100px;
}

/* =====================================================
   CTA Section - Classic Dark Blue
   ===================================================== */
.cta-section {
    padding: 60px 0;
    background: var(--primary-dark);
    color: white;
    text-align: center;
    position: relative;
}

.cta-section h2 {
    margin-bottom: 16px;
    font-size: 1.75rem;
    font-weight: 600;
}

.cta-section p {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 550px;
    margin: 0 auto 24px;
    line-height: 1.7;
}

/* =====================================================
   Footer - Classic Dark
   ===================================================== */
.footer {
    background: var(--bg-dark);
    color: white;
}

.footer-top {
    padding: 60px 0 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 16px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 600;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}


.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-contact i {
    color: var(--accent-color);
    width: 18px;
    font-size: 0.85rem;
}


.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* =====================================================
   Back to Top - Classic
   ===================================================== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    display: block;
}


/* =====================================================
   Comprehensive Responsive Design
   ===================================================== */

/* Large Desktops */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

/* Small Desktops & Large Tablets */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
        gap: 30px;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 76px;
        right: -100%;
        width: 300px;
        height: calc(100vh - 76px);
        background: white;
        flex-direction: column;
        padding: 30px 24px;
        gap: 8px;
        box-shadow: var(--shadow-xl);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu a {
        padding: 14px 18px;
        font-size: 1rem;
        border-radius: var(--radius);
    }
    
    .nav-menu a::after {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
        min-width: 48px;
        min-height: 48px;
        align-items: center;
        justify-content: center;
    }
    
    .nav-actions {
        display: none;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image {
        order: -1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .about-section,
    .services-section,
    .projects-section,
    .certificates-section,
    .partners-section {
        padding: 80px 0;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .navbar .container {
        height: 68px;
    }
    
    .navbar .logo img {
        height: 42px;
    }
    
    .nav-menu {
        top: 68px;
        height: calc(100vh - 68px);
        width: 100%;
    }
    
    .hero {
        padding-top: 68px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-logo {
        width: 120px;
        margin-bottom: 24px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .services-grid,
    .projects-grid,
    .certificates-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 28px 24px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .partner-logo {
        padding: 16px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 36px;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .about-section,
    .services-section,
    .projects-section,
    .certificates-section,
    .partners-section {
        padding: 60px 0;
    }
    
    .stats-section {
        padding: 50px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-card {
        padding: 20px 16px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .cta-section {
        padding: 50px 0;
    }
    
    .cta-section h2 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 14px 28px;
    }
    
    /* Beta alert mobile */
    body.has-beta-alert {
        padding-top: 45px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .hero-logo {
        width: 100px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .about-content h2 {
        font-size: 1.4rem;
    }
    
    .service-card {
        padding: 24px 20px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    .footer-top {
        padding: 50px 0 40px;
    }
    
    .footer-col h4 {
        margin-bottom: 16px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
    }
    
    .nav-menu a {
        min-height: 48px;
    }
    
    .footer-social a {
        width: 44px;
        height: 44px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-scroll,
    .back-to-top,
    .beta-alert {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 40px 0;
    }
    
    .about-section,
    .services-section,
    .projects-section {
        padding: 40px 0;
    }
}

/* =====================================================
   Page-Specific Responsive Fixes
   For inline styles in PHP pages
   ===================================================== */

/* Page Headers */
.page-header {
    padding: 180px 0 100px !important;
}

@media (max-width: 768px) {
    .page-header {
        padding: 140px 0 70px !important;
    }
    
    .page-header h1 {
        font-size: 1.8rem !important;
    }
    
    .page-header p {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 120px 0 60px !important;
    }
    
    .page-header h1 {
        font-size: 1.5rem !important;
    }
}

/* Vision & Mission Cards - About Page */
@media (max-width: 992px) {
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    [style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    [style*="grid-template-columns: 1fr 1.5fr"] {
        grid-template-columns: 1fr !important;
    }
    
    [style*="gap: 60px"] {
        gap: 30px !important;
    }
    
    [style*="gap: 50px"] {
        gap: 30px !important;
    }
}

@media (max-width: 768px) {
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    [style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    [style*="padding: 100px 0"] {
        padding: 60px 0 !important;
    }
    
    [style*="padding: 80px 0"] {
        padding: 50px 0 !important;
    }
    
    [style*="padding: 50px"] {
        padding: 30px !important;
    }
    
    [style*="padding: 40px"] {
        padding: 24px !important;
    }
    
    [style*="font-size: 2.5rem"] {
        font-size: 1.6rem !important;
    }
    
    [style*="font-size: 1.8rem"] {
        font-size: 1.4rem !important;
    }
    
    [style*="font-size: 1.5rem"] {
        font-size: 1.2rem !important;
    }
    
    [style*="gap: 40px"] {
        gap: 20px !important;
    }
    
    [style*="gap: 30px"] {
        gap: 16px !important;
    }
    
    /* Icon sizes */
    [style*="width: 100px"][style*="height: 100px"] {
        width: 80px !important;
        height: 80px !important;
    }
    
    [style*="width: 80px"][style*="height: 80px"] {
        width: 60px !important;
        height: 60px !important;
    }
    
    /* Images */
    [style*="max-width: 400px"] {
        max-width: 100% !important;
    }
    
    /* Team member images */
    [style*="width: 70px"][style*="height: 70px"] {
        width: 60px !important;
        height: 60px !important;
    }
}

@media (max-width: 480px) {
    [style*="font-size: 2.5rem"] {
        font-size: 1.4rem !important;
    }
    
    [style*="font-size: 1.8rem"] {
        font-size: 1.2rem !important;
    }
    
    [style*="font-size: 1.4rem"] {
        font-size: 1.1rem !important;
    }
    
    [style*="font-size: 1.1rem"] {
        font-size: 1rem !important;
    }
    
    [style*="padding: 50px"] {
        padding: 20px !important;
    }
    
    [style*="padding: 40px"] {
        padding: 20px !important;
    }
    
    [style*="line-height: 2"] {
        line-height: 1.8 !important;
    }
    
    [style*="width: 80px"][style*="height: 80px"] {
        width: 50px !important;
        height: 50px !important;
    }
    
    [style*="font-size: 2rem"] {
        font-size: 1.5rem !important;
    }
    
    [style*="font-size: 2.5rem"] i {
        font-size: 1.8rem !important;
    }
}

/* Contact Page Specific */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

@media (max-width: 992px) {
    .contact-grid,
    [style*="grid-template-columns: 1fr 1.5fr"] {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}

@media (max-width: 768px) {
    .contact-grid {
        gap: 30px !important;
    }
}

/* Projects Page - Category Headers */
@media (max-width: 768px) {
    [style*="display: flex"][style*="align-items: center"][style*="gap: 20px"] {
        flex-direction: column !important;
        text-align: center !important;
        gap: 12px !important;
    }
}

/* Form Inputs Responsive */
input, select, textarea {
    font-size: 16px !important; /* Prevents iOS zoom */
}

@media (max-width: 768px) {
    input, select, textarea {
        padding: 14px 16px !important;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Cards and Boxes */
@media (max-width: 768px) {
    [style*="border-radius: 20px"] {
        border-radius: 12px !important;
    }
    
    [style*="border-radius: 30px"] {
        border-radius: 20px !important;
    }
}

/* Quote Icons */
@media (max-width: 768px) {
    [style*="font-size: 4rem"] {
        font-size: 2.5rem !important;
    }
}

/* Flex layouts */
@media (max-width: 480px) {
    [style*="display: flex"][style*="gap: 20px"] {
        gap: 12px !important;
    }
}
