:root {
    --primary-bg: #7b6b5a;
    --accent: #d6bfa4;
    --text-dark: #4a3f33;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    overflow-x: hidden;
}

/********** HEADER **********/
.header {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.8s ease;
    z-index: 100;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.15));
}

.header-inner {
    max-width: 1280px;
    margin: auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    margin: -40px 0;
}

.logo img {
    width: 220px;
    height: 64px;
}

.nav {
    display: flex;
    gap: 32px;
    margin-left: 48px;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;

}

.live-btn {
    background: var(--accent);
    color: var(--text-dark);
    border: none;
    padding: 10px 26px;
    margin-right: -220px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .3s ease;
}

.live-btn:hover {
    transform: scale(1.05);
}

.header-socials {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 15px;
    padding-left: 15px;
}

.header-socials a {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-socials i {
    font-size: 13px !important;
    color: #d6bfa4;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.header-socials a:hover i {
    color: #ffffff;
    opacity: 1;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .header-socials {
        display: none;
    }
}

/********** Hero **********/
.hero {
    height: 50vh;
    padding-top: 140px;
    margin-bottom: 70px;
    background: var(--primary-bg);
    position: relative;
    transition: background 0.8s ease;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    transition:
        background-image 0.8s ease,
        opacity 0.8s ease,
        transform 1.6s ease;
    z-index: 0;
}

.hero-content {
    position: relative;
    max-width: 1280px;
    margin: auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.arch-image {
    width: 380px;
    aspect-ratio: 3 / 4;
    border-radius: 999px 999px 32px 32px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    transition: all 1s ease;
    margin-bottom: -96px;
    box-shadow:
        0 20px 40px -50px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(214, 191, 164, 0.4);
}

.arch-image.loaded {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.arch-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text {
    color: #fff;
}

.hero-text h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.3;
}

.hero-text p {
    font-size: 16px;
    line-height: 1.9;
    opacity: 0.85;
    max-width: 520px;
}

@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .arch-image {
        width: 300px;
    }
}

/********** Banner **********/
.banner-wrapper {
    width: 100%;
    padding: 70px 0;
    display: flex;
    justify-content: center;
}

.banner {
    width: 100%;
    max-width: 1280px;
    height: 420px;
    display: flex;
    flex-direction: row-reverse;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.banner-image {
    position: relative;
    width: 50%;
    height: 100%;
}

.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to left,
            rgba(0, 0, 0, 0.35),
            rgba(0, 0, 0, 0.1));
}

.banner-content {
    width: 50%;
    height: 100%;
    background-color: #e9ddcf;
    padding: 64px 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.banner-content h1 {
    margin: 0 0 32px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.6;
    color: #5a4a3a;
}

.banner-content p {
    margin: 0 0 40px;
    font-size: 18px;
    line-height: 2.2;
    color: #6b5c4d;
}

.banner-date {
    font-size: 20px;
    font-weight: 600;
    color: #5a4a3a;
}

@media (max-width: 992px) {
    .banner {
        flex-direction: column;
        height: auto;
    }

    .banner-image,
    .banner-content {
        width: 100%;
    }

    .banner-image {
        height: 260px;
    }

    .banner-content {
        padding: 48px 32px;
    }

    .banner-content h1 {
        font-size: 26px;
    }

    .banner-content p {
        font-size: 16px;
    }
}

/********** Logos **********/
.logo-section {
    width: 100%;
    height: 120px;
    margin: 20px 0;
    background-color: #CDB394;
    display: flex;
    align-items: center;
}

.logo-grid {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 120px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 0.8fr));
    align-items: center;
    justify-items: center;
    gap: 0;
}

.logo-item {
    width: 300px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-item img {
    max-height: 96px;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

@media (max-width: 1024px) {
    .logo-item {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .logo-section {
        height: auto;
        padding: 12px 0;
    }

    .logo-grid {
        row-gap: 12px;
    }
}

/********** Programs **********/
.programs-section {
    width: 100%;
    margin: 0 100px;
    padding: 80px 0;
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    background-color: #ffffff;
}

.programs-header {
    text-align: center;
    margin-right: -128px;
    margin-bottom: 48px;
}

.programs-subtitle {
    display: block;
    font-size: 16px;
    color: #8b7a5e;
    margin-bottom: 8px;
}

.programs-title {
    font-size: 28px;
    font-weight: 700;
    color: #3f3a32;
}

.program-category {
    padding-bottom: 56px;
    margin-bottom: 56px;
}

.program-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.category-title {
    font-size: 24px;
    font-weight: 700;
    color: #3f3a32;
    padding-right: 128px;
}

.category-border {
    width: 1180px;
    height: 3px;
    margin: 12px 100px 12px auto;
    margin-bottom: 32px;
    background-color: #e5e7eb;

}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 32px;
}

.program-card {
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.program-card:hover {
    transform: translateY(-8px);
}

.program-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #f3f4f6;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

.program-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.program-meta {
    display: block;
    font-size: 14px;
    color: #9a8f7a;
    margin-bottom: 8px;
}

.program-name {
    font-size: 22px;
    font-weight: 600;
    color: #3f3a32;
    margin-bottom: 12px;
}

.program-desc {
    font-size: 15px;
    line-height: 1.9;
    color: #6b665e;
    max-width: 320px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .programs-grid {
        grid-template-columns: unset;
        grid-auto-flow: column;
        grid-auto-columns: 80%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 0 24px;
        gap: 24px;
    }

    .program-card {
        scroll-snap-align: start;
    }

    .category-title {
        padding-right: 24px;
    }
}


/********** Experts **********/
.experts {
    padding: 20px 24px;
    text-align: center;
    background-color: #e7daca;
    font-family: inherit;
}

.experts-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.experts-header p {
    font-size: 16px;
    opacity: 0.6;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.experts-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.experts-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.expert-card {
    position: relative;
    width: 170px;
    height: 240px;
    margin: 10px;
    background-color: #f6ede4;
    border-radius: 140px 140px 24px 24px;
    overflow: hidden;
    cursor: pointer;
    box-shadow:
        0 10px 30px -5px rgba(0, 0, 0, 0.15),
        0 4px 10px -2px rgba(0, 0, 0, 0.05);
    transition:
        transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.4s ease;
}

.expert-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease;
}

.expert-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    color: #fff;
    text-align: center;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
}

.expert-info h3 {
    font-size: 18px;
    margin: 0 0 4px 0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.expert-info span {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.9;
    color: #ddd;
    display: block;
    text-transform: uppercase;
}

@media (hover: hover) {
    .expert-card:hover {
        transform: translateY(-10px);
        box-shadow:
            0 20px 40px -5px rgba(0, 0, 0, 0.25),
            0 8px 15px -5px rgba(0, 0, 0, 0.1);
    }

    .expert-card:hover img {
        transform: scale(1.1);
        filter: brightness(0.95);
    }

    .expert-card:hover .expert-info {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .experts-wrapper {
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding-inline: 24px;
        justify-content: flex-start;
    }

    .experts-row {
        display: contents;
    }

    .expert-card {
        flex: 0 0 240px;
        scroll-snap-align: center;
    }

    .expert-info {
        opacity: 1;
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    }
}

/********** Live **********/
.live-section {
    padding: 40px 20px 60px;
}

.live-header {
    text-align: center;
    margin-bottom: 40px;
}

.live-header h2 {
    font-size: 28px;
    font-weight: 600;
}

.live-header p {
    font-size: 16px;
    margin-top: 6px;
    color: #3a2f25;
}

.slider-wrapper {
    overflow-x: auto;
    padding-bottom: 10px;
    display: flex;
    justify-content: center;
}

.slider-wrapper::-webkit-scrollbar {
    height: 6px;
}

.slider-wrapper::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.slider {
    display: flex;
    gap: 20px;
    min-width: max-content;
}

.live-card {
    background-color: #d7c3a8;
    border-radius: 20px;
    width: 260px;
    padding: 25px 20px 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.live-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.image-wrapper {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.live-card:hover img {
    transform: scale(1.08);
}

.live-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: #3a2f25;
}

.live-card span {
    display: block;
    font-size: 14px;
    margin: 8px 0 18px;
    color: #4b3d30;
}

.live-btn {
    display: inline-block;
    padding: 10px 22px;
    background-color: #5a4a3a;
    color: #ffffff;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.live-btn:hover {
    background-color: #3f3328;
}

@media (min-width: 768px) {
    .live-card {
        width: 280px;
    }
}

/********** Footer **********/
.hadi-footer {
    background-color: #261E1A;
    color: #E0E0E0;
    position: relative;
    padding-bottom: 20px;
    overflow: hidden;
}

.footer-wave {
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 1;
}

.footer-wave svg {
    width: 100%;
    height: 60px;
    display: block;
}

.footer-wave path {
    fill: #261E1A;
}

.footer-pattern {
    position: absolute;
    bottom: -170px;
    left: 5%;
    font-size: 400px;
    color: #C6A87C;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h2,
.footer-col h3 {
    color: #C6A87C;
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: #C6A87C;
}

.footer-col p {
    color: #A09590;
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    border: none;
    color: #fff;
}

.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: #C6A87C;
    border: 1px solid rgba(198, 168, 124, 0.3);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    overflow: hidden;
}

.icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: 0.3s;
}

.social-icons a:hover {
    background-color: #C6A87C;
    transform: translateY(-3px);
}

.social-icons a:hover .icon-img {
    filter: brightness(0) saturate(100%) invert(12%) sepia(16%) saturate(845%) hue-rotate(334deg) brightness(96%) contrast(92%);
}

.links-col ul {
    list-style: none;
    padding: 0;
}

.links-col ul li {
    margin-bottom: 12px;
}

.links-col ul li a {
    color: #A09590;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.links-col ul li a i {
    font-size: 0.7rem;
    margin-left: 8px;
    color: #C6A87C;
    opacity: 0.5;
    transition: 0.3s;
}

.links-col ul li a:hover {
    color: #C6A87C;
    padding-right: 5px;
}

.links-col ul li a:hover i {
    opacity: 1;
}

.hadith-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    border-right: 3px solid #C6A87C;
    position: relative;
}

.quote-icon {
    font-size: 1.5rem;
    color: #C6A87C;
    opacity: 0.3;
    position: absolute;
    top: 10px;
    left: 10px;
}

.hadith-text {
    font-style: italic;
    color: #fff !important;
    margin-bottom: 10px;
}

.hadith-source {
    display: block;
    text-align: left;
    color: #C6A87C;
    font-size: 0.85rem;
    font-weight: bold;
}

.app-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.app-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(198, 168, 124, 0.15);
    color: #C6A87C;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    transition: 0.3s;
    border: 1px solid transparent;
}

.app-btn:hover {
    background: #C6A87C;
    color: #261E1A;
}

.newsletter-form {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-form input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 0 15px;
    flex: 1;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.newsletter-form button {
    background: #C6A87C;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.submit-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(9%) sepia(13%) saturate(1065%) hue-rotate(338deg) brightness(97%) contrast(92%);
}

.newsletter-form button:hover {
    background: #fff;
    transform: scale(1.1);
}

.copyright-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h3::after {
        right: 50%;
        transform: translateX(50%);
    }

    .social-icons {
        justify-content: center;
    }

    .app-buttons {
        flex-direction: column;
    }

    .hadith-source {
        text-align: center;
    }
}
