/* ===========================================
   Archive Banner Styles - Complete Version
   =========================================== */

/* ---- Common Banner Styles ---- */
.archive-banner {
    padding: 50px 0;
    position: relative;
    min-height: 400px;
}

.banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 300px;
}

.banner-content {
    flex: 1;
}

.content-wrapper-b {
    padding: 20px;
}

.banner-title {
    line-height: 1.5;
    font-weight: 800;
    margin-bottom: 15px;
}

.banner-subtitle {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 0.5rem;
    display: block;
}

.banner-description {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.8;
    margin-bottom: 30px;
    margin-top: 0.5rem;
}

.banner-sidebar {
    flex: 0 0 350px;
}

.sidebar-image {
    text-align: center;
}

.sidebar-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ---- Style 1 Specific ---- */
.banner-style-1 {
    padding: 50px 0;
}

/* ---- Style 2 Specific ---- */
.banner-style-2 {
    padding: 60px 0;
}

.banner-style-2 .banner-container {
    flex-direction: column;
}

.banner-style-2 .banner-properties {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    text-align: start;
}

.banner-style-2 .banner-properties li {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    padding-right: 25px;
    margin-bottom: 6px;
    position: relative;
}

.banner-style-2 .banner-properties li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0.8;
}

/* ---- Style 3 Specific ---- */
.banner-style-3-wrapper {
    padding: 30px 0;
    margin-bottom: 30px;
    position: relative;
}

.banner-style-3-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.banner-style-3-header {
    text-align: center;
    margin-bottom: 20px;
}

.category-grid {
    display: grid;
    gap: 15px;
    margin: 30px 0;
}

.category-grid-1 {
    grid-template-columns: 1fr;
}
.category-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.category-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.category-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #b0bfc6;
    display: flex;
    gap: 1rem;
    align-items: center;
    min-height: 120px;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.category-image {
    flex: 0 0 150px;
    height: 150px;
    background-size: contain; /* or 'contain' if preferred */
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #b0bfc6;
    background-color: #e6eaed;
    padding: 1rem;
    width: 100%;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-content {
    flex: 1;
    padding: 1.5rem 0 1.5rem 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: flex-start;
}

.category-card-title {
    font-weight: 800;
    color: #222;
    line-height: 1.3;
}

.category-link-text {
    color: #03a791;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ---- Button Styles ---- */
.banner-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.banner-buttons-start {
    justify-content: flex-start;
}
.banner-buttons-center {
    justify-content: center;
}

.banner-btn {
    position: relative;
    overflow: hidden;
    padding: 0.1rem 1rem 0.1rem 0.1rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-direction: row;
}

.banner-btn-icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    background:
        linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1))
            padding-box,
        linear-gradient(90deg, #b0bfc6 0%, rgba(176, 191, 198, 0.4) 100%)
            border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
    order: 2;
    flex-shrink: 0;
    min-width: 40px;
    min-height: 40px;
}

.banner-btn span {
    order: 1;
    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
}

.banner-btn-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    margin: 0 !important;
    position: static !important;
    overflow: visible !important;
}

.banner-btn-icon.default-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z'/%3E%3C/svg%3E");
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

/* Button Hover Effects */
.banner-btn:hover .banner-btn-icon {
    transform: translateX(-70px);
    opacity: 0;
}

.banner-btn:hover span {
    transform: translateX(-40%);
}

.banner-btn::after {
    content: "";
    position: absolute;
    right: 2px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    background:
        linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1))
            padding-box,
        linear-gradient(90deg, #b0bfc6 0%, rgba(176, 191, 198, 0.4) 100%)
            border-box;
    transform: translateX(70px);
    opacity: 0;
    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
}

.banner-btn::before {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%) translateX(70px);
    opacity: 0;
    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
    z-index: 1;
}

.banner-btn.has-default-icon::before {
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z'/%3E%3C/svg%3E");
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

.banner-btn.has-custom-icon::before {
    background-image: var(--duplicate-icon);
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

.banner-btn:hover::after,
.banner-btn:hover::before {
    transform: translateX(0) translateY(-50%);
    opacity: 1;
}

.banner-btn:hover::after {
    transform: translateX(0);
}

.banner-btn:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

/* استایل برای دولایه آیکن */
/* استایل برای دولایه آیکن */
.banner-btn-icon .icon-bg-layer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* رنگ این لایه از PHP میاد */
}

.banner-btn-icon .icon-content {
    display: flex;
    align-items: center;
    justify-content: center;
    /* بدون background - فقط رنگ متن */
}

.banner-btn-icon .icon-content svg {
    width: 20px !important;
    height: 20px !important;
    /* رنگ fill از PHP میاد */
}

/* ---- Default Archive Header ---- */
.default-archive-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.default-archive-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.default-archive-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #333;
    font-weight: 700;
}

.default-archive-header p {
    font-size: 1.2em;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* ---- Admin Styles ---- */
.banner-images-wrapper {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

.banner-images-wrapper p {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.banner-images-wrapper button {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
}

.property-item {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.property-item input {
    flex: 1;
}

.button-item {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #f9f9f9;
}

.button-item h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Additional Admin Form Styles */
.form-table th {
    width: 200px;
}

.color-picker-container {
    display: inline-block;
}

/* Style field visibility controls */
.style-1-field,
.style-2-field,
.style-3-field {
    transition: all 0.3s ease;
}
/* این کد رو کلا حذف کن از CSS */
/* Title with SVG decorations - فقط برای style 2 و 3 */
.banner-style-2 .banner-title,
.banner-style-3 .banner-title {
    padding: 0 15px;
    position: relative;
    display: inline-block;
}

/* Ensure proper positioning for title container */
.banner-style-2 .banner-title-wrapper,
.banner-style-3 .banner-style-3-header {
    text-align: center;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

/* ---- Tablet (768px - 1023px) ---- */
@media (max-width: 1023px) and (min-width: 768px) {
    .banner-subtitle {
        font-size: 28px;
    }

    .banner-description {
        font-size: 18px;
    }

    .content-wrapper-b {
        padding: 15px;
    }

    .banner-style-2 .banner-properties li {
        font-size: 14px;
        padding-right: 15px;
    }
}

/* ---- Mobile (767px and below) ---- */
@media (max-width: 767px) {
    /* Common Mobile Styles */
    .archive-banner {
        padding: 30px 0;
    }

    .banner-container {
        flex-direction: column !important;
        padding: 0 15px;
    }

    .banner-content,
    .banner-sidebar {
        flex: 1 1 100% !important;
        order: unset !important;
    }

    .content-wrapper-b {
        padding: 10px;
        text-align: center;
    }

    .banner-title {
        margin-top: 2rem;
        text-align: center;
    }

    .banner-subtitle {
        font-size: 22px;
        margin-bottom: 20px;
        text-align: center;
    }

    .banner-description {
        font-size: 16px;
        text-align: center;
    }

    /* Button Mobile Styles */
    .banner-buttons {
        justify-content: center !important;
        margin-top: 20px;
    }

    .banner-btn.has-custom-icon::before {
        background-size: 18px 18px;
    }

    /* Style 2 Mobile */
    .banner-style-2 .banner-properties li {
        padding-right: 20px !important;
        font-size: 14px !important;
    }

    /* Style 3 Mobile */
    .category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .category-card {
        flex-direction: column !important;
        text-align: center !important;
        padding: 15px !important;
    }

    .category-image {
        flex: 0 0 80px !important;
        height: 80px !important;
        align-self: center;
        border-left: none;
        border-bottom: 1px solid #b0bfc6;
    }

    .category-content {
        flex: 1 !important;
        padding: 0 !important;
        justify-content: center;
        align-items: center;
    }
}

/* ---- Small Mobile (480px and below) ---- */
@media (max-width: 480px) {
    /* .banner-style-3-wrapper .category-grid {
        grid-template-columns: 1fr !important;
    } */

    .banner-title {
        font-size: 24px !important;
    }

    .banner-subtitle {
        font-size: 18px !important;
    }

    .banner-description {
        font-size: 14px !important;
    }
}

/* ---- Additional Utility Classes ---- */

/* Loading states */
.banner-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Animation classes for enhanced UX */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-animate-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus states for accessibility */
.banner-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.category-card:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .archive-banner,
    .banner-style-3-wrapper {
        background: white !important;
        color: black !important;
    }

    .banner-btn,
    .category-card {
        display: none;
    }
}
