﻿/* ===== CSS Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    font-family: "Outfit", serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* ===== Responsive Container ===== */
.subscription-error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    width: 100%;
    position: relative;
}

.error-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    width: 100%;
    position: relative;
}

/* ===== Card Styles ===== */
.error-card {
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: none;
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

    .error-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    }

/* ===== Card Header ===== */
.card-header {
    border-radius: 20px 20px 0 0;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    text-align: center;
}

    .card-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
        opacity: 0.5;
    }

    .card-header.bg-info {
        background: linear-gradient(135deg, #17a2b8 0%, #2c9bae 100%);
    }

    .card-header.bg-warning {
        background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    }

    .card-header.bg-secondary {
        background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    }

    .card-header.bg-danger {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    }

/* ===== Card Body ===== */
.card-body {
    padding: 3rem 2rem;
    background: #fff;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.4;
    word-wrap: break-word;
    margin-bottom: 1rem;
    color: #333;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

h4 {
    font-size: 1.5rem;
    color: #555;
    font-weight: 600;
}

h5 {
    font-size: 1.2rem;
    color: #666;
    font-weight: 500;
}

h6 {
    font-size: 1.1rem;
    color: #444;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

p, span {
    word-wrap: break-word;
    color: #666;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

/* ===== Alert Styles ===== */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 5px solid #ffc107;
    color: #856404;
}

.alert-heading {
    color: #856404;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

    .alert-heading i {
        color: #ffc107;
    }

/* ===== Error Icon Animation ===== */
@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@-webkit-keyframes pulse {
    0% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        -webkit-transform: scale(1.1);
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 0.8;
    }
}

@keyframes pulse {
    0% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        -webkit-transform: scale(1.1);
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 0.8;
    }
}

.error-icon {
    -webkit-animation: pulse 2s infinite ease-in-out;
    animation: pulse 2s infinite ease-in-out;
    margin-bottom: 1.5rem;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* ===== Contact Information Section ===== */
.contact-info {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 2px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

    .contact-info h6 {
        color: #495057;
        font-size: 1.2rem;
        text-align: center;
        margin-bottom: 2rem;
        position: relative;
        padding-bottom: 1rem;
    }

        .contact-info h6::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 3px;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
            border-radius: 2px;
        }

    .contact-info .row {
        display: flex;
        justify-content: center;
        align-items: stretch;
        gap: 1.5rem;
    }

        .contact-info .row > div {
            flex: 1;
            min-width: 250px;
            background: white;
            padding: 1.5rem;
            border-radius: 12px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
            transition: all 0.3s ease;
            border: 1px solid #e9ecef;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 120px;
        }

            .contact-info .row > div:hover {
                transform: translateY(-5px);
                box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
                border-color: #667eea;
            }

            .contact-info .row > div i {
                font-size: 1.8rem;
                margin-bottom: 1rem;
                color: #667eea;
                background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
                background-clip: text;
            }

            .contact-info .row > div span {
                font-size: 1.1rem;
                color: #495057;
                font-weight: 500;
                display: block;
                margin-bottom: 0.5rem;
            }

            .contact-info .row > div small {
                color: #6c757d;
                font-size: 0.95rem;
                display: block;
            }

/* ===== Responsive Design ===== */

/* Large Desktops */
@media (min-width: 1200px) {
    .card-body {
        padding: 4rem 3rem;
    }

    .card-header {
        padding: 3rem 2rem;
    }

    h1 {
        font-size: 3rem;
    }

    .contact-info .row > div {
        min-width: 280px;
    }
}

/* Tablets and Small Desktops */
@media (max-width: 991.98px) {
    .error-card {
        max-width: 800px;
    }

    .card-body {
        padding: 2.5rem 1.5rem;
    }

    .contact-info .row {
        flex-wrap: wrap;
    }

        .contact-info .row > div {
            min-width: calc(50% - 1rem);
            margin-bottom: 1rem;
        }
}

/* Tablets */
@media (max-width: 768px) {
    .card-body {
        padding: 2rem 1.25rem;
    }

    .card-header {
        padding: 1.75rem 1.25rem;
    }

    h1 {
        font-size: 2rem;
    }

    h4 {
        font-size: 1.35rem;
    }

    .error-icon {
        font-size: 3.5rem !important;
    }

    .alert {
        padding: 1.25rem;
    }

    .contact-info {
        padding: 1.5rem;
    }

        .contact-info .row > div {
            min-width: 100%;
            margin-bottom: 1rem;
        }
}

/* Mobile Phones */
@media (max-width: 576px) {
    .subscription-error-page,
    .error-container {
        padding: 0.75rem;
    }

    .card-body {
        padding: 1.5rem 1rem;
    }

    .card-header {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    h6 {
        font-size: 1rem;
    }

    .error-icon {
        font-size: 3rem !important;
        margin-bottom: 1rem;
    }

    .alert {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .alert-heading {
        font-size: 1.2rem;
    }

    .contact-info {
        margin-top: 2rem;
        padding-top: 1.5rem;
        padding: 1.25rem;
    }

        .contact-info h6 {
            font-size: 1.1rem;
            margin-bottom: 1.5rem;
        }

        .contact-info .row > div {
            padding: 1.25rem 1rem;
            min-height: 100px;
        }

            .contact-info .row > div i {
                font-size: 1.5rem;
                margin-bottom: 0.75rem;
            }

            .contact-info .row > div span {
                font-size: 1rem;
            }
}

/* Small Mobile Phones */
@media (max-width: 375px) {
    h1 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.15rem;
    }

    .error-icon {
        font-size: 2.5rem !important;
    }

    .contact-info .row > div {
        padding: 1rem;
    }

        .contact-info .row > div i {
            font-size: 1.3rem;
        }

        .contact-info .row > div span {
            font-size: 0.95rem;
        }
}

/* ===== Print Styles ===== */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .error-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        max-width: 100% !important;
    }

    .card-header {
        background: #f8f9fa !important;
        color: black !important;
        border-bottom: 2px solid #dee2e6;
    }

    .alert {
        border: 1px solid #ddd !important;
        background: white !important;
        color: black !important;
    }

    .contact-info {
        border: 1px solid #ddd;
        background: white !important;
    }

        .contact-info .row > div {
            box-shadow: none !important;
            border: 1px solid #ddd !important;
        }

    a, .btn, button {
        text-decoration: none !important;
        color: black !important;
    }
}

/* ===== Accessibility & Performance ===== */
button, .btn, a {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    outline: none;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Custom Utility Classes ===== */
.text-muted {
    color: #6c757d !important;
}

.text-primary {
    color: #007bff !important;
}

.text-dark {
    color: #343a40 !important;
}

.border-top {
    border-top: 1px solid #dee2e6 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 2rem !important;
}

.pt-4 {
    padding-top: 1.5rem !important;
}

.me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

/* RTL Specific Adjustments */
[dir="rtl"] .me-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

 .contact-info h6::after {
    background: linear-gradient(270deg, #667eea 0%, #764ba2 100%);
}

/* Smooth transitions for all interactive elements */
.error-card,
.contact-info .row > div,
.alert,
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus styles for accessibility */
:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

    :focus:not(:focus-visible) {
        outline: none;
    }
