/* ==========================================================================
   CUSTOM MODERN PAGES STYLING (Contact, Privacy, Terms)
   ========================================================================== */

:root {
    --primary-color: #D10024;
    --primary-hover: #E11D48;
    --dark-bg: #151528;
    --dark-card: #1E1B4B;
    --text-primary: #1A1A2E;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
}

/* -- Fade In Animations -- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* -- Breadcrumb Styling Tweak -- */
#breadcrumb.section {
    padding: 20px 0;
    background: #fdfdfd;
    border-bottom: 1px solid #f2f2f2;
}

/* -- Modern Page Hero -- */
.modern-page-hero {
    position: relative;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    overflow: hidden;
    text-align: center;
    padding: 40px 20px;
}
.modern-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}
.modern-page-hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(209,0,36,0.2) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    z-index: 0;
}
.modern-page-hero-content {
    position: relative;
    z-index: 2;
}
.modern-page-hero-content h1 {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.modern-page-hero-content .hero-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #D10024, #ff3355);
    margin: 0 auto;
    border-radius: 2px;
}

/* -- Contact Cards section -- */
.contact-container {
    padding: 60px 0;
    background-color: #fafbfc;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.contact-card-modern {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.contact-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(209, 0, 36, 0.08);
    border-color: rgba(209, 0, 36, 0.15);
}

.contact-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(209,0,36,0.08), rgba(255,51,85,0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.contact-card-modern:hover .contact-icon-wrap {
    background: linear-gradient(135deg, #D10024, #ff3355);
}
.contact-icon-wrap i {
    font-size: 24px;
    color: #D10024;
    transition: color 0.3s ease;
}
.contact-card-modern:hover .contact-icon-wrap i {
    color: #fff;
}

.contact-details-wrap h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}
.contact-details-wrap p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}
.contact-details-wrap a {
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.2s;
}
.contact-details-wrap a:hover {
    color: #D10024;
    text-decoration: none;
}

/* -- Premium Contact Form -- */
.contact-form-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}
.contact-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #D10024, #ff3355);
}
/* Adjust border for Arabic RTL */
[dir="rtl"] .contact-form-card::before {
    left: auto;
    right: 0;
}

.contact-form-card h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}
.contact-form-card .form-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group-modern {
    margin-bottom: 24px;
    position: relative;
}

.form-group-modern label {
    font-size: 13px;
    font-weight: 600;
    color: #4B5563;
    margin-bottom: 8px;
    display: block;
}

.form-control-modern {
    width: 100%;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    background-color: #F9FAFB;
    transition: all 0.3s ease;
    box-shadow: none;
}

.form-control-modern:focus {
    border-color: #D10024;
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(209, 0, 36, 0.08);
}

textarea.form-control-modern {
    resize: none;
    min-height: 120px;
}

.btn-submit-modern {
    background: linear-gradient(135deg, #D10024, #ff3355);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(209, 0, 36, 0.25);
    transition: all 0.3s ease;
}
.btn-submit-modern:hover {
    background: linear-gradient(135deg, #B3001E, #E11D48);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(209, 0, 36, 0.35);
    color: #fff;
}
.btn-submit-modern:active {
    transform: translateY(0);
}

/* -- Branches and Tabs styling -- */
.branch-toggle-wrap {
    margin-bottom: 24px;
}

.branch-nav-tabs {
    display: flex;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 20px;
    gap: 16px;
    padding: 0;
    list-style: none;
}

.branch-nav-tabs li {
    margin-bottom: -2px;
}

.branch-nav-link {
    display: block;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-muted);
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none !important;
}

.branch-nav-tabs li.active .branch-nav-link,
.branch-nav-link:hover {
    color: #D10024;
    border-bottom-color: #D10024;
}

.branch-map-container {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0,0,0,0.03);
    padding: 16px;
    margin-top: 30px;
}

.branch-map-container iframe {
    width: 100%;
    height: 380px;
    border-radius: 12px;
    border: 0;
    display: block;
}

.branch-card-modern-info {
    margin-bottom: 16px;
    animation: fadeInUp 0.4s ease forwards;
}
.branch-card-modern-info h4 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}
.branch-card-modern-info p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 12px 0;
}

/* -- Privacy & Terms Pages Layout -- */
.policy-page-container {
    padding: 60px 0;
    background-color: #fafbfc;
}

.policy-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.02);
    margin-bottom: 30px;
}

.policy-sidebar {
    position: sticky;
    top: 130px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
}

.policy-sidebar h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
    border-bottom: 2px solid #F3F4F6;
    padding-bottom: 10px;
}

.policy-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.policy-nav-list li {
    margin-bottom: 12px;
}

.policy-nav-list li a {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.policy-nav-list li a:hover,
.policy-nav-list li.active a {
    color: #D10024;
    padding-left: 6px;
}

[dir="rtl"] .policy-nav-list li a:hover,
[dir="rtl"] .policy-nav-list li.active a {
    padding-left: 0;
    padding-right: 6px;
}

.policy-section {
    margin-bottom: 36px;
    scroll-margin-top: 150px;
}
.policy-section:last-child {
    margin-bottom: 0;
}

.policy-section h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.policy-section h2 i {
    color: #D10024;
    font-size: 18px;
}

.policy-section p {
    font-size: 15px;
    color: #4B5563;
    line-height: 1.8;
    margin-bottom: 16px;
}

.policy-section ul {
    padding-left: 20px;
    margin-bottom: 16px;
}
[dir="rtl"] .policy-section ul {
    padding-left: 0;
    padding-right: 20px;
}

.policy-section ul li {
    font-size: 15px;
    color: #4B5563;
    line-height: 1.8;
    margin-bottom: 8px;
}

/* Alert Success styling for contact feedback */
.alert-success-modern {
    background-color: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 30px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* -- Responsive Tweaks -- */
@media (max-width: 991px) {
    .policy-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }
}
@media (max-width: 767px) {
    .modern-page-hero-content h1 {
        font-size: 32px;
    }
    .contact-form-card {
        padding: 24px;
    }
    .policy-card {
        padding: 24px;
    }
}
