/* ==========================================================
   الهوية البصرية الموحدة - بوابة وزارة الأوقاف والإرشاد
   تُحمَّل بعد ملف التصميم القديم وتوحّد ألوان وأشكال الصفحات الداخلية
   (لحذفها والرجوع للتصميم القديم: أزل رابط ministry-theme.css من app.blade.php)
   ========================================================== */
:root {
    --mt-primary: #14595a;
    --mt-primary-dark: #0c3a3b;
    --mt-primary-soft: #eef5f5;
    --mt-gold: #b08a3e;
    --mt-line: #d9e0e1;
    --mt-text: #1f2a2b;
    --mt-muted: #5c686a;
    --mt-radius: 6px;
}

html,
body {
    overflow-x: hidden;
}

body {
    background: #f6f8f8;
    color: var(--mt-text);
    -webkit-text-size-adjust: 100%;
}

img,
video,
iframe {
    max-width: 100%;
}

/* Colors, buttons, tabs and headings moved to Tailwind (tailwind.config.js + resources/css/app.css) */

/* ---------- الأشكال: حواف رسمية بدل الدوائر الكبيرة ---------- */
.radius-8,
.radius-12,
.radius-32,
.radius-33,
.radius-48,
.radius-53,
.radius-56,
.radius-58,
.radius-70,
.rounded-lg,
.rounded-xl,
.rounded-2xl,
.rounded-3xl,
.news-card,
[class*="rounded-["]:not([class*="rounded-t-"]):not([class*="rounded-b-"]):not([class*="rounded-l-"]):not([class*="rounded-bl-"]):not([class*="rounded-br-"]) {
    border-radius: var(--mt-radius) !important;
}

[class*="rounded-t-["] {
    border-top-left-radius: var(--mt-radius) !important;
    border-top-right-radius: var(--mt-radius) !important;
}

[class*="rounded-b-["] {
    border-bottom-left-radius: var(--mt-radius) !important;
    border-bottom-right-radius: var(--mt-radius) !important;
}

[class*="rounded-l-["] {
    border-top-left-radius: var(--mt-radius) !important;
    border-bottom-left-radius: var(--mt-radius) !important;
}

[class*="rounded-bl-["],
[class*="rounded-br-["] {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.rounded-full {
    border-radius: 9999px;
}

/* ---------- العناوين ---------- */
.header.text-gray-800,
.header.text-gray-900 {
    color: var(--mt-primary-dark) !important;
}

.header.text-gray-50,
.header.text-white {
    color: #fff !important;
}

.title {
    font-size: 18px;
    line-height: 1.7;
}

.sub-title {
    font-size: 18px;
}

.title.text-gray-800,
.sub-title.text-gray-800 {
    color: var(--mt-primary-dark) !important;
}

.header-section-media {
    border-radius: var(--mt-radius) !important;
}

/* ---------- الكروت ---------- */
.news-card,
.service-container>div,
.sector-container>div,
[class*="rounded-["][class*="border"][class*="border-gray"] {
    background: #fff;
    border: 1px solid var(--mt-line) !important;
    box-shadow: none;
    transition: box-shadow .25s, transform .25s;
}

.news-card:hover,
.service-container>div:hover,
.sector-container>div:hover {
    box-shadow: 0 8px 24px rgba(12, 58, 59, .12) !important;
    transform: translateY(-2px);
}

.news-card img,
.service-container img,
.sector-container img {
    border-radius: 4px !important;
}

.hover\:shadow-service:hover {
    box-shadow: 0 8px 24px rgba(12, 58, 59, .12) !important;
}

/* ---------- الحقول والنماذج ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
textarea,
select {
    border-radius: var(--mt-radius) !important;
    border-color: var(--mt-line);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--mt-primary) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 89, 90, .12);
}

/* ---------- الجوال ---------- */
.landing-container {
    max-width: 1232px;
    margin-inline: auto;
    width: calc(100% - 32px);
}

.landing-padding {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 16px;
}

@media (min-width: 1024px) {
    .landing-container {
        width: calc(100% - 48px);
    }

    .landing-padding {
        padding-inline: 24px;
    }
}

@media (max-width: 1023px) {
    .header {
        font-size: 24px;
    }
}

@media (max-width: 640px) {
    .header {
        font-size: 22px;
        padding-bottom: 10px;
    }

    [class*="h-[360px]"],
    [class*="max-h-[360px]"] {
        height: 210px !important;
        max-height: 210px !important;
    }

    [class*="h-[400px]"],
    [class*="max-h-[400px]"],
    [class*="max-h-[420px]"] {
        height: auto !important;
        max-height: 260px !important;
    }

    [class*="max-h-[466px]"],
    [class*="h-[459px]"],
    [class*="max-h-[45vw]"] {
        max-height: 260px !important;
    }

    [class*="w-[328px]"],
    [class*="min-w-[328px]"] {
        width: 82vw !important;
        min-width: 82vw !important;
        max-width: 320px;
    }

    [class*="w-[700px]"],
    [class*="w-[674px]"],
    [class*="w-[564px]"],
    [class*="w-[512px]"],
    [class*="w-[459px]"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    .btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    .service-container,
    .news-container {
        scroll-snap-type: x mandatory;
    }

    .service-container>*,
    .news-container>* {
        scroll-snap-align: start;
    }

    table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
    }

    a,
    button {
        -webkit-tap-highlight-color: rgba(20, 89, 90, .15);
    }
}

/* ---- second pass ---- */
[style*="border-radius: 30px"],
[style*="border-radius:30px"],
[style*="border-radius: 20px"],
[style*="border-radius:20px"],
[style*="border-radius: 16px"],
[style*="border-radius:16px"],
[style*="border-radius: 12px"],
[style*="border-radius:12px"] {
    border-radius: var(--mt-radius) !important;
}

.tab-container .btn-tab:not(.btn-primary),
.ship-container .ship:not(.ship-primary-dark) {
    background: #fff !important;
    color: var(--mt-muted) !important;
    border: 1px solid var(--mt-line) !important;
}

.tab-container .btn-tab:not(.btn-primary):hover,
.ship-container .ship:not(.ship-primary-dark):hover {
    background: var(--mt-primary) !important;
    color: #fff !important;
    border-color: var(--mt-primary) !important;
}

@media (max-width: 640px) {

    [class*="h-[276px]"],
    [class*="h-[300px]"],
    [class*="max-h-[372px]"],
    [class*="max-h-[216px]"] {
        height: 200px !important;
        max-height: 200px !important;
    }
}
