/* ==========================================================================
   Purflux - Persian RTL Theme
   Brand color: #007ac3 (Purflux Blue)
   Font: Vazirmatn
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
    --brand-blue: #007ac3;
    --brand-blue-dark: #005f9a;
    --brand-blue-light: #4ba0d8;
    --brand-blue-bg: #eaf4fb;
    --text-dark: #333536;
    --text-medium: #4c4c4c;
    --text-light: #6c757d;
    --gray-light: #ebeae6;
    --gray-medium: #b3b3b3;
    --border-color: #d8d8d8;
    --white: #ffffff;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: var(--white);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-blue-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ================== HEADER ================== */
.top-bar {
    background: var(--brand-blue);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar a {
    color: var(--white);
    opacity: 0.9;
}

.top-bar a:hover {
    opacity: 1;
}

.lang-select {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.lang-select option {
    color: var(--text-dark);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-form input[type="text"] {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    width: 160px;
}

.search-form input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-form button {
    background: var(--white);
    color: var(--brand-blue);
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
}

.site-header {
    background: var(--white);
    padding: 18px 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo img {
    height: 60px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
}

.main-nav a {
    display: block;
    padding: 10px 16px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--brand-blue);
    color: var(--white);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--brand-blue);
    border-radius: 2px;
}

/* ================== HERO / BANNER ================== */
.hero {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    color: var(--white);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('images/sfondo_purflux.jpg') no-repeat center right/cover;
    opacity: 0.15;
}

.hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* ================== PAGE HEADER (breadcrumb) ================== */
.page-header {
    background: var(--brand-blue-bg);
    padding: 30px 0 20px;
    border-bottom: 2px solid var(--brand-blue);
}

.page-header h1 {
    color: var(--brand-blue);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.breadcrumb {
    color: var(--text-medium);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--brand-blue);
}

.breadcrumb .sep {
    margin: 0 8px;
    color: var(--gray-medium);
}

/* ================== HOMEPAGE BOXES ================== */
.hp-boxes {
    padding: 40px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1160px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.hp-box {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hp-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hp-box img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.hp-box .box-title {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: var(--brand-blue);
    color: var(--white);
    padding: 14px 20px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

/* ================== NEWS + BANNERS SECTION ================== */
.news-banners {
    padding: 40px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.hp-news h2 {
    color: var(--brand-blue);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-blue);
}

.hp-news-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.hp-news-item:last-child {
    border-bottom: none;
}

.hp-news-item .date {
    color: var(--brand-blue);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}

.hp-news-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.5;
}

.hp-news-item h3 a {
    color: var(--brand-blue);
}

.hp-news-item p {
    color: var(--text-medium);
    font-size: 14px;
    line-height: 1.7;
}

.hp-news-item ul {
    padding-right: 20px;
    font-size: 14px;
    color: var(--text-medium);
}

.hp-banners {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hp-banners a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
    background: var(--brand-blue);
}

.hp-banners a:hover {
    transform: scale(1.02);
}

.hp-banners img {
    width: 100%;
    height: auto;
}

/* ================== FOOTER-CTA SECTION ================== */
.footer-cta {
    background: var(--brand-blue);
    padding: 40px 0;
    color: var(--white);
}

.footer-cta .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.footer-cta-item h4 {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.footer-cta-item a {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--white);
    transition: transform 0.2s;
}

.footer-cta-item a:hover {
    transform: translateY(-3px);
}

.footer-cta-item img {
    width: 100%;
    height: auto;
}

.footer-cta-item.social {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ================== SITE FOOTER ================== */
.site-footer {
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.8);
    padding: 30px 0 20px;
    font-size: 13px;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-footer .company-info {
    line-height: 1.7;
    max-width: 600px;
}

.site-footer nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.site-footer nav a {
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 500;
}

.site-footer nav a:hover {
    color: var(--white);
}

.socialbar {
    text-align: center;
    line-height: 1.6;
}

.socialbar a {
    display: inline-block;
    margin: 0 4px;
    width: 32px;
    height: 32px;
    background: var(--brand-blue);
    color: var(--white);
    border-radius: 50%;
    line-height: 32px;
    text-align: center;
    font-size: 14px;
    transition: background 0.2s;
}

.socialbar a:hover {
    background: var(--brand-blue-light);
}

/* ================== CONTENT PAGES ================== */
.page-content {
    padding: 40px 0;
}

.page-content .container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.main-content {
    background: var(--white);
}

.main-content h2 {
    color: var(--brand-blue);
    font-size: 24px;
    font-weight: 700;
    margin: 30px 0 15px;
}

.main-content h3 {
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 10px;
}

.main-content p {
    margin-bottom: 15px;
    line-height: 1.9;
    text-align: justify;
}

.main-content ul,
.main-content ol {
    padding-right: 25px;
    margin-bottom: 15px;
}

.main-content ul li,
.main-content ol li {
    margin-bottom: 8px;
    line-height: 1.9;
}

.main-content strong {
    color: var(--text-dark);
    font-weight: 700;
}

.sidebar {
    background: var(--brand-blue);
    color: var(--white);
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    box-shadow: var(--shadow-md);
}

.sidebar h3 {
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.sidebar a {
    color: var(--white);
}

.download-list {
    list-style: none;
    padding: 0;
}

.download-list li {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.download-list li:hover {
    background: rgba(255, 255, 255, 0.2);
}

.download-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 14px;
    gap: 10px;
}

.download-list .file-icon {
    background: var(--white);
    color: var(--brand-blue);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.related-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.related-boxes .box {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 6px;
    text-align: center;
}

.related-boxes .box img {
    border-radius: 4px;
    margin-bottom: 8px;
}

.related-boxes .box a {
    font-size: 13px;
    font-weight: 500;
}

/* ================== BUTTONS ================== */
.btn {
    display: inline-block;
    background: var(--brand-blue);
    color: var(--white);
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn:hover {
    background: var(--brand-blue-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--brand-blue);
    border: 2px solid var(--brand-blue);
}

.btn-outline:hover {
    background: var(--brand-blue);
    color: var(--white);
}

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

/* ================== PRODUCTS SECTION ================== */
.section-block {
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}

.section-block:last-child {
    border-bottom: none;
}

.section-block h2 {
    color: var(--brand-blue);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
}

.section-block h3 {
    color: var(--text-medium);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--brand-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.product-card h4 {
    color: var(--brand-blue);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.product-card p {
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 15px;
}

.product-card .card-link {
    display: inline-block;
    color: var(--brand-blue);
    font-weight: 600;
    font-size: 13px;
    padding-top: 5px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
    padding: 8px 16px;
    background: var(--brand-blue-bg);
    border-radius: 4px;
    border: 0;
}

.product-card .card-link:hover {
    background: var(--brand-blue);
    color: var(--white);
}

.new-products-card {
    background: linear-gradient(135deg, #f5f7fa, #e4e9f0);
    border-radius: 10px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.new-products-card img {
    max-height: 180px;
    margin: 0 auto 20px;
}

.new-products-card p {
    font-size: 17px;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 500;
}

.full-banner {
    display: block;
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.full-banner img {
    width: 100%;
    height: auto;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

.video-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.video-card iframe {
    width: 100%;
    height: 260px;
    border: 0;
    display: block;
}

.video-card .video-label {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: var(--brand-blue);
    font-size: 15px;
    background: var(--brand-blue-bg);
}

/* ================== CATALOGUE PAGE ================== */
.catalogue-lead {
    background: var(--brand-blue-bg);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.9;
}

.catalogue-lead p {
    margin-bottom: 12px;
}

.catalogue-cta {
    text-align: center;
    margin: 30px 0;
}

.catalogue-cta .btn {
    font-size: 15px;
    padding: 14px 40px;
}

.app-download {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
    background: #fafafa;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
}

.app-download p {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-medium);
}

.app-download img {
    max-width: 260px;
    margin: 0 auto;
}

/* ================== NEWS LIST ================== */
.news-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.news-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-right: 4px solid var(--brand-blue);
    border-radius: 6px;
    padding: 20px 24px;
    transition: all 0.2s ease;
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    align-items: center;
}

.news-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(-4px);
}

.news-item .news-date {
    color: var(--brand-blue);
    font-weight: 700;
    font-size: 15px;
    background: var(--brand-blue-bg);
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    font-family: 'Vazirmatn', sans-serif;
    direction: ltr;
}

.news-item h2 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.6;
}

.news-item h2 a {
    color: var(--brand-blue);
}

.news-item p {
    color: var(--text-medium);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 0;
}

.news-item .details-btn {
    background: var(--brand-blue);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    align-self: center;
}

.news-item .details-btn:hover {
    background: var(--brand-blue-dark);
    color: var(--white);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    background: var(--white);
    color: var(--brand-blue);
    border: 1px solid var(--brand-blue);
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover,
.pagination .active {
    background: var(--brand-blue);
    color: var(--white);
}

/* ================== RESPONSIVE ================== */
@media (max-width: 900px) {
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--white);
        box-shadow: var(--shadow-md);
        padding: 10px;
    }

    .main-nav.open ul {
        display: flex;
    }

    .main-nav a {
        padding: 12px 16px;
        border-radius: 4px;
    }

    .mobile-toggle {
        display: flex;
    }

    .site-header {
        position: relative;
    }

    .hp-boxes,
    .news-banners {
        grid-template-columns: 1fr;
    }

    .page-content .container {
        grid-template-columns: 1fr;
    }

    .footer-cta .container {
        grid-template-columns: 1fr;
    }

    .site-footer .container {
        flex-direction: column;
        text-align: center;
    }

    .site-footer nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero p {
        font-size: 16px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .app-download {
        grid-template-columns: 1fr;
    }

    .news-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .news-item .news-date {
        justify-self: start;
    }

    .top-bar .container {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 500px) {
    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 24px;
    }

    .logo img {
        height: 45px;
    }

    .search-form input[type="text"] {
        width: 120px;
    }
}
