/*
 * Internal Pages Unified Styling
 * متطابق مع تصميم الموقع الرئيسي
 * الألوان الرئيسية: #181A1C (داكن), #FECE1A (ذهبي), #FFF (أبيض)
 */

/* إزالة المسافات بين النافبار والهيدر */
main {
    margin: 0;
    padding: 0;
}

main > .page-header {
    margin-top: 0 !important;
    padding-top: 60px;
}

/* Page Header - تصميم مبسط مع صورة طبيعية */
.page-header {
    background: #fece1a;
    color: #181a1c;
    padding: 60px 0 40px;
    margin-bottom: 0;
    margin-top: 0;
    border-bottom: 6px solid #181a1c;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    margin-left: 0;
    margin-right: 0;
}

.page-header.with-image {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 250px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: 0 !important;
    background-color: #fece1a;
    left: 0;
    right: 0;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .page-header {
        padding: 40px 0 30px;
        min-height: 150px;
    }

    .page-header.with-image {
        background-attachment: scroll;
        background-size: cover;
        min-height: 200px;
    }
}

/* إزالة جميع الطبقات الشفافة - عرض الصورة بجودتها الطبيعية */
.page-header.with-image .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    letter-spacing: 1px;
    line-height: 1.2;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 25px;
    border-radius: 8px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.page-header .lead {
    font-size: 1.1em;
    color: #fff;
    font-weight: 400;
    text-align: center;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 6px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

/* تحسينات للهيدر بدون صورة */
.page-header:not(.with-image) h1 {
    color: #181a1c;
    text-shadow: none;
    background: transparent;
}

.page-header:not(.with-image) .lead {
    color: #181a1c;
    text-shadow: none;
    background: transparent;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2em;
        margin-bottom: 10px;
        padding: 12px 20px;
    }

    .page-header .lead {
        font-size: 1em;
        padding: 8px 15px;
        max-width: 90%;
    }
}

/* إزالة جميع التأثيرات الإضافية - عرض طبيعي للصورة */
.page-header .container {
    animation: fadeInUp 0.8s ease-out;
}

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

/* تحسينات للشاشات الكبيرة */
@media (min-width: 1200px) {
    .page-header {
        min-height: 280px;
        padding: 70px 0 50px;
    }

    .page-header.with-image {
        min-height: 300px;
    }

    .page-header h1 {
        font-size: 3em;
    }

    .page-header .lead {
        font-size: 1.3em;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .page-header {
        padding: 30px 0 20px;
        min-height: 120px;
    }

    .page-header.with-image {
        min-height: 160px;
    }

    .page-header h1 {
        font-size: 1.8em;
        margin-bottom: 8px;
        padding: 10px 15px;
    }

    .page-header .lead {
        font-size: 0.9em;
        padding: 6px 12px;
        max-width: 95%;
    }
}

/* تحسين الأداء وجودة الصورة */
.page-header.with-image {
    will-change: transform;
    transform: translateZ(0);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    background-blend-mode: normal;
}

/* إزالة جميع التأثيرات - عرض الصورة بجودتها الطبيعية */

/* Content Sections - متطابق مع primary-section */
.content-section {
    /* background: #181a1c; */
    background: #fece19;
    padding: 50px 0;
}

.content-section .container {
    padding-top: 50px;
}

.content-section .title {
    text-align: center;
    padding: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #fff;
}

.content-section .title h1 {
    font-weight: normal;
    margin-bottom: 20px;
    padding: 0;
    color: #fff;
}

.content-section .title > p {
    font-size: 20px;
    color: #fece1a;
    font-weight: lighter;
}

/* Triangle decoration */
.content-section .triangle {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #000000;
    /* border-top: 40px solid #fece1a; */
    margin: 0 auto;
    margin-bottom: 20px;
}

/* Product/Content thumbnails */
.content-section .thumbnail {
    position: relative;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
    background: #191a1c;
    margin-bottom: 30px;
}

.content-section .thumbnail h3 {
    color: #fece1a;
    margin-top: 10px;
    font-size: 20px;
}

.content-section .thumbnail > p {
    padding-bottom: 20px;
    color: #fff;
}

/* Secondary Content Section - متطابق مع secondary-section */
.secondary-content-section {
    background: #fece1a;
    padding: 50px 0;
}

.secondary-content-section .container {
    padding-top: 50px;
}

.secondary-content-section h1,
.secondary-content-section h2,
.secondary-content-section h3,
.secondary-content-section h4,
.secondary-content-section h5,
.secondary-content-section h6,
.secondary-content-section .title > p {
    color: #181a1c;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.secondary-content-section .title {
    text-align: center;
    padding: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #181a1c;
}

.secondary-content-section .title h1 {
    font-weight: normal;
    margin-bottom: 20px;
    padding: 0;
}

.secondary-content-section .title > p {
    font-size: 20px;
    font-weight: lighter;
}

/* Forms styling */
.internal-form {
    background: #fff;
    background: rgba(255, 255, 255, 0.9);
    z-index: 110;
    position: relative;
    padding: 20px;
    border-radius: 5px;
}

.internal-form h3 {
    color: #838589;
    padding-bottom: 20px;
}

/* Contact details */
.contact-details {
    color: #181a1c;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
}

.contact-details h4 {
    color: #181a1c;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.2em;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.contact-details p {
    color: #181a1c;
    padding: 5px 0;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.2);
}

/* No content message */
.no-content,
.no-products {
    text-align: center;
    padding: 60px 0;
    color: #fece1a;
}

.no-content h3,
.no-products h3 {
    color: #fff;
    margin-bottom: 15px;
}

.no-content p,
.no-products p {
    color: #fece1a;
}

/* Product grid styling */
#portfolio-grid {
    margin-top: 30px;
}

#portfolio-grid .thumbnail {
    position: relative;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
    background: #191a1c;
    margin-bottom: 30px;
    overflow: hidden;
}

#portfolio-grid .thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

#portfolio-grid .thumbnail h3 {
    color: #fece1a;
    margin-top: 10px;
    font-size: 18px;
}

#portfolio-grid .thumbnail p {
    padding: 10px 20px 20px;
    color: #fff;
    font-size: 14px;
}

#portfolio-grid .thumbnail .more {
    display: block;
    z-index: 4;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: 0 auto;
    margin-left: -41px;
    margin-top: -41px;
    width: 80px;
    height: 80px;
    font-size: 40px;
    color: #fff;
    text-decoration: none;
    line-height: 70px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#portfolio-grid .thumbnail:hover .more {
    opacity: 1;
}

#portfolio-grid .thumbnail .mask {
    opacity: 0;
    filter: alpha(opacity=0);
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #181a1c;
    position: absolute;
    transition: all 0.3s ease;
}

#portfolio-grid .thumbnail:hover .mask {
    opacity: 0.85;
    top: 0;
}

/* Buttons - متطابق مع الموقع الرئيسي */
.internal-btn {
    border: 1px solid #747c89;
    color: #747c89;
    background-color: transparent;
    padding: 15px 30px;
    font-size: 17px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.internal-btn:hover {
    background-color: #fece1a;
    color: #181a1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/* Navigation pills - متطابق مع الموقع الرئيسي */
.nav-pills > li > a {
    padding-left: 25px;
    padding-right: 25px;
    border: 1px solid #181a1c;
    /* color: #fff; */
    background: transparent;
}

.nav-pills > li > a:hover,
.nav-pills > .active > a,
.nav-pills > .active > a:hover,
.nav-pills > .active > a:focus {
    background: #181a1c;
    color: #fff;
    border-color: #fece1a;
}

/* Single project styling */
.single-project {
    margin-bottom: 30px;
    background: #181a1c;
}

.single-project img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.project-description {
    padding: 20px;
}

.project-title h3 {
    color: #fece1a;
    margin-bottom: 10px;
}

.project-info span {
    color: #fece1a;
}

.project-info {
    font-weight: 100;
    padding: 10px 0;
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2em;
    }

    .page-header .lead {
        font-size: 1em;
    }

    .content-section .title h1 {
        font-size: 1.8em;
    }

    .secondary-content-section .title h1 {
        font-size: 1.8em;
    }
}

/* Alert styling for internal pages */
.internal-alert {
    margin-bottom: 20px;
    border-radius: 4px;
    padding: 15px;
}

.internal-alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.internal-alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Navigation active state enhancement */
.navbar .nav > .active > a,
.navbar .nav > .active > a:hover,
.navbar .nav > .active > a:focus {
    border: 2px solid #fece1a !important;
    color: #fff !important;
    background-color: #181a1c !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
}

/* Contact section styling - متطابق مع الصفحة الرئيسية */
.contact {
    background: #fece1a;
}

.contact h1,
.contact h2,
.contact h3,
.contact h4,
.contact h5,
.contact h6,
.contact .section .title > p,
.contact .social > li > a {
    color: #181a1c;
}

.contact .section {
    padding-bottom: 50px;
}

.contact .section .container {
    padding-top: 50px;
}

.contact .section .title {
    text-align: center;
    padding: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #181a1c;
}

.contact .section .title h1 {
    font-weight: normal;
    margin-bottom: 20px;
    padding: 0;
    color: #181a1c;
}

.contact .section .title > p {
    font-size: 20px;
    color: #181a1c;
    font-weight: lighter;
}

.contact .contact-info {
    text-align: center;
    font-size: 22px;
    color: #181a1c;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.contact .info-mail {
    border: 2px solid #181a1c;
    width: 60%;
    margin: 0 auto;
    padding: 15px;
    color: #181a1c;
    font-weight: bold;
    font-size: 1.1em;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.contact .social {
    color: #181a1c;
    list-style: none;
    margin-left: 10px;
}

.contact .social > li {
    margin-top: 15px;
}

.contact .social > li > a {
    color: #181a1c;
    font-size: 50px;
    transition: margin 0.4s;
    -webkit-transition: margin 0.4s;
}

.contact .social li a:hover {
    color: #fff;
}
