/* Font Imports */
@font-face {
    font-family: 'IRANSansWeb';
    src: url('../fonts/IRANSansWeb.eot');
    src: url('../fonts/IRANSansWeb.eot?#iefix') format('embedded-opentype'),
         url('../fonts/IRANSansWeb.woff') format('woff'),
         url('../fonts/IRANSansWeb.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000000;
    --secondary-color: #1c2526;
    --accent-color: #0071e3;
    --background-color: #f5f5f7;
    --content-bg: #ffffff;
    --text-color: #1d1d1f;
    --secondary-text: #6e6e73;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'IRANSansWeb', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    letter-spacing: 0.5px;
    direction: rtl;
    text-align: right;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.content {
    flex: 1 0 auto;
    background: var(--content-bg);
    padding: 2.5rem;
    border-radius: 1.125rem;
    margin: 2.5rem auto;
    max-width: 800px;
    min-width: 300px;
    width: 90%;
    box-shadow: 0 0.25rem 1.875rem rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* Prevent child elements from overflowing */
}

main.content:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.375rem 2.5rem rgba(0, 0, 0, 0.08);
}

h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
    overflow-wrap: break-word;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 1.75rem);
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--primary-color);
    overflow-wrap: break-word;
}

p {
    font-size: clamp(0.9375rem, 2.5vw, 1.0625rem);
    color: var(--text-color);
    margin-bottom: 1.25rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.25rem;
}

ul li {
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    color: var(--text-color);
    margin-bottom: 0.625rem;
    position: relative;
    padding-right: 1.25rem;
}

ul li:before {
    content: "•";
    position: absolute;
    right: -1.25rem;
    color: var(--accent-color);
}

.faq-item {
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.625rem;
}

.faq-question {
    font-size: clamp(0.9375rem, 2.5vw, 1.125rem);
    font-weight: 600;
    color: var(--accent-color);
    cursor: pointer;
    transition: color 0.3s ease;
    overflow-wrap: break-word;
}

.faq-question:hover {
    color: #005bb5;
}

.faq-answer {
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    color: var(--secondary-text);
    margin-top: 0.625rem;
    padding-right: 1.25rem;
    display: none;
    transition: opacity 0.3s ease;
    overflow-wrap: break-word;
}

.faq-answer.active {
    display: block;
    opacity: 1;
}

/* aiArtifact: Enhanced Footer Style */

/* Footer container */
.footer {
    text-align: center;
    margin: 15px 0; /* 🔄 Unified margin */
    padding: 20px; /* 🛠️ Slightly increased padding */
    background: #f1f3f1; /* 🎨 Softer background color */
    color: #0a7be6; /* 🌈 Adjusted blue for better contrast */
    border-radius: 10px; /* 📏 Smoother corners */
}

/* Last paragraph spacing */
.footer p:last-child {
    margin-top: 20px; /* 📏 Consistent spacing */
}

/* Scoped link styles */
.tel a,
a.area-filter,
footer a {
    text-decoration: none !important;
    color: #3b5bdb; /* 🎨 Modernized link color */
    transition: color 0.3s ease, background 0.3s ease; /* ⏩ Smoother transition */
    position: relative;
}

/* Hover effects for links */
.tel a:hover,
a.area-filter:hover,
footer a:hover {
    color: #1e3a8a; /* 🌑 Darker hover shade */
    font-weight: 700; /* 💪 Bolder hover effect */
}

/* Underline effect for non-button links */
.tel a:not(.btn-view-all):not(.button):not(button)::after,
a.area-filter:not(.btn-view-all):not(.button):not(button)::after,
footer a:not(.btn-view-all):not(.button):not(button)::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px; /* 📏 Adjusted underline position */
    height: 3px; /* 📏 Thicker underline */
    background: linear-gradient(90deg, #3b5bdb 0%, #1e3a8a 100%); /* 🎨 Updated gradient */
    transform: scaleX(0);
    transition: transform 0.3s ease; /* ⏩ Smoother animation */
    border-radius: 3px; /* 📏 Rounded underline edges */
}

/* Hover state for underline effect */
.tel a:hover:not(.btn-view-all):not(.button):not(button)::after,
a.area-filter:hover:not(.btn-view-all):not(.button):not(button)::after,
footer a:hover:not(.btn-view-all):not(.button):not(button)::after {
    transform: scaleX(1); /* 🚀 Full underline on hover */
}

/* Responsive Design */
@media (max-width: 768px) {
    main.content {
        padding: 1.5rem;
        margin: 1.5rem auto;
        width: 95%;
        min-width: 0;
    }

    h1 {
        font-size: clamp(1.5rem, 4.5vw, 2rem);
    }

    h2 {
        font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    }

    p, ul li, .faq-question, .faq-answer {
        font-size: clamp(0.875rem, 2.5vw, 0.9375rem);
    }

    .footer {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    main.content {
        padding: 1rem;
        margin: 1rem auto;
        border-radius: 0.75rem;
    }

    h1 {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
    }

    h2 {
        font-size: clamp(1.125rem, 3vw, 1.25rem);
    }

    .footer a {
        margin: 0 0.3125rem;
        display: inline-block;
        margin-bottom: 0.5rem;
    }

    .footer p {
        line-height: 1.6;
    }
}