﻿/* =========================================================
   Omran Cement - Main Stylesheet
   Purpose: Home page core sections
   Sections:
   01. Global Theme Variables
   02. Base / Shared Utilities
   03. Buttons
   04. Hero Section
   05. Highlights Section
   06. Commitment Section
   07. RTL Support
   08. Responsive Adjustments
========================================================= */


/* =========================================================
   01. Global Theme Variables
========================================================= */

:root {
    --oc-primary: #005f73;
    --oc-primary-dark: #003f4d;
    --oc-primary-light: #0a9396;
    --oc-secondary: #ee9b00;
    --oc-secondary-dark: #ca6702;
    --oc-dark: #111827;
    --oc-gray-900: #1f2937;
    --oc-gray-800: #374151;
    --oc-gray-700: #4b5563;
    --oc-gray-600: #6b7280;
    --oc-gray-500: #9ca3af;
    --oc-gray-200: #e5e7eb;
    --oc-gray-100: #f3f4f6;
    --oc-light: #ffffff;
    --oc-body-bg: #ffffff;
    --oc-card-bg: #041739;
    --oc-card-bg-hover: #042839;
    --oc-section-bg: #f7f9fb;
    --oc-border: rgba(17, 24, 39, 0.12);
    --oc-shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.08);
    --oc-shadow-md: 0 18px 40px rgba(15, 23, 42, 0.14);
    --oc-shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.22);
    --oc-radius-sm: 0.25rem;
    --oc-radius-md: 0.75rem;
    --oc-radius-lg: 1.25rem;
    --oc-transition: all 0.25s ease;
    --oc-card-bg-hover: #042839;
    --oc-highlight-shadow: 0 22px 45px rgba(4, 23, 57, 0.28), 0 8px 18px rgba(15, 23, 42, 0.16);
    --oc-highlight-shadow-hover: 0 34px 70px rgba(4, 23, 57, 0.38), 0 14px 28px rgba(15, 23, 42, 0.22);
}


/* =========================================================
   02. Base / Shared Utilities
========================================================= */

html {
    scroll-behavior: smooth;
}

body.holcim-theme {
    background-color: var(--oc-body-bg);
    color: var(--oc-dark);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

.main-content {
    width: 100%;
    min-height: 60vh;
}

.text-primary-brand {
    color: var(--oc-primary) !important;
}

.section-eyebrow,
.hero-eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--oc-secondary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-title {
    margin-bottom: 1.25rem;
    color: var(--oc-dark);
    font-size: clamp(2rem, 4vw, 3.8rem);
    font-weight: 850;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-lead {
    margin-bottom: 1.2rem;
    color: var(--oc-gray-800);
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.75;
}

.section-text {
    margin-bottom: 2rem;
    color: var(--oc-gray-600);
    font-size: 1rem;
    line-height: 1.8;
}


/* =========================================================
   03. Buttons
========================================================= */

.btn-brand-primary,
.btn-brand-secondary,
.btn-brand-outline {
    border-radius: 0;
    padding: 0.9rem 1.6rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: var(--oc-transition);
}

.btn-brand-primary {
    border: 2px solid var(--oc-secondary);
    background-color: var(--oc-secondary);
    color: var(--oc-dark);
}

    .btn-brand-primary:hover,
    .btn-brand-primary:focus {
        border-color: var(--oc-light);
        background-color: var(--oc-light);
        color: var(--oc-dark);
        transform: translateY(-2px);
    }

.btn-brand-outline {
    border: 2px solid rgba(255, 255, 255, 0.85);
    background-color: transparent;
    color: var(--oc-light);
}

    .btn-brand-outline:hover,
    .btn-brand-outline:focus {
        border-color: var(--oc-light);
        background-color: var(--oc-light);
        color: var(--oc-primary-dark);
        transform: translateY(-2px);
    }

.btn-brand-secondary {
    border: 2px solid var(--oc-primary);
    background-color: var(--oc-primary);
    color: var(--oc-light);
}

    .btn-brand-secondary:hover,
    .btn-brand-secondary:focus {
        border-color: var(--oc-primary-dark);
        background-color: var(--oc-primary-dark);
        color: var(--oc-light);
        transform: translateY(-2px);
    }


/* =========================================================
   04. Hero Section
========================================================= */

.hero-section {
    position: relative;
    min-height: calc(100vh - 88px);
    overflow: hidden;
    background-color: var(--oc-dark);
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 88px);
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 88px);
    background: linear-gradient( 90deg, rgba(0, 31, 41, 0.86) 0%, rgba(0, 67, 82, 0.68) 15%, rgba(0, 0, 0, 0.18) 70% );
}

.hero-content {
    max-width: 820px;
    padding-top: 7rem;
    padding-bottom: 7rem;
    color: var(--oc-light);
}

.hero-title {
    margin-bottom: 1.5rem;
    color: var(--oc-light);
    font-size: clamp(2.8rem, 6vw, 6.5rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.065em;
}

.hero-description {
    max-width: 680px;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    font-weight: 400;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}


/* =========================================================
   05. Highlights Section
========================================================= */

.highlights-section {
    position: relative;
    z-index: 5;
    margin-top: -0.75rem;
    padding-bottom: 6rem;
}

.highlights-panel {
    background: transparent;
    perspective: 1000px;
}

.highlight-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 330px;
    height: 100%;
    padding: 3rem 2.5rem;
    overflow: hidden;
    background: var(--oc-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.12rem;
    box-shadow: var(--oc-highlight-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

    .highlight-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(10, 147, 150, 0.18), transparent 42%), linear-gradient(315deg, rgba(238, 155, 0, 0.13), transparent 38%);
        opacity: 0;
        transition: opacity 0.25s ease;
        pointer-events: none;
    }

    .highlight-card:hover,
    .highlight-card:focus-within {
        background-color: var(--oc-card-bg-hover);
        border-color: rgba(238, 155, 0, 0.38);
        box-shadow: var(--oc-highlight-shadow-hover);
        transform: translateY(-8px) scale(1.01);
    }

        .highlight-card:hover::before,
        .highlight-card:focus-within::before {
            opacity: 1;
        }

.highlight-card-bordered {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.highlight-number,
.highlight-title,
.highlight-text,
.highlight-link {
    position: relative;
    z-index: 1;
}

.highlight-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 1.5rem;
    color: var(--oc-secondary);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0;
    border: 1px solid rgba(238, 155, 0, 0.35);
    border-radius: 50%;
    background: rgba(238, 155, 0, 0.08);
}

.highlight-title {
    margin-bottom: 1rem;
    color: var(--oc-light);
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: 0;
}

.highlight-text {
    margin-bottom: 2rem;
    color: rgba(243, 244, 246, 0.82);
    font-size: 1rem;
    line-height: 1.75;
}

.highlight-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: auto;
    color: var(--oc-secondary);
    font-size: 0.95rem;
    font-weight: 850;
    text-decoration: none;
    transition: color 0.25s ease;
}

    .highlight-link::after {
        content: "→";
        margin-inline-start: 0.5rem;
        transition: transform 0.25s ease;
    }

    .highlight-link:hover,
    .highlight-link:focus {
        color: var(--oc-light);
    }

        .highlight-link:hover::after,
        .highlight-link:focus::after {
            transform: translateX(4px);
        }

[dir="rtl"] .highlight-link::after {
    content: "←";
}

[dir="rtl"] .highlight-link:hover::after,
[dir="rtl"] .highlight-link:focus::after {
    transform: translateX(-4px);
}


/* =========================================================
   06. Commitment Section
========================================================= */

.commitment-section {
    padding: 6rem 0 7rem;
    background: linear-gradient( 180deg, var(--oc-section-bg) 0%, #ffffff 100% );
}

.commitment-content {
    max-width: 680px;
}

.commitment-media {
    position: relative;
    min-height: 520px;
}

.commitment-image {
    width: 100%;
    height: 520px;
    object-fit: cover;
    box-shadow: var(--oc-shadow-md);
}

.commitment-stat {
    position: absolute;
    right: 2rem;
    bottom: -2rem;
    width: min(310px, calc(100% - 3rem));
    padding: 1.6rem;
    background-color: var(--oc-primary);
    color: var(--oc-light);
    box-shadow: var(--oc-shadow-md);
}

    .commitment-stat strong {
        display: block;
        margin-bottom: 0.45rem;
        color: var(--oc-secondary);
        font-size: clamp(2rem, 4vw, 3.2rem);
        font-weight: 900;
        line-height: 1;
        letter-spacing: -0.04em;
    }

    .commitment-stat span {
        display: block;
        color: rgba(255, 255, 255, 0.88);
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1.55;
    }


/* =========================================================
   07. RTL Support
========================================================= */

html[dir="rtl"] body.holcim-theme {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

html[dir="rtl"] .hero-overlay {
    background: linear-gradient( 270deg, rgba(0, 31, 41, 0.86) 0%, rgba(0, 67, 82, 0.68) 15%, rgba(0, 0, 0, 0.18) 70% );
}

html[dir="rtl"] .hero-title,
html[dir="rtl"] .section-title,
html[dir="rtl"] .highlight-title {
    letter-spacing: -0.02em;
}

html[dir="rtl"] .highlight-link::after {
    content: "←";
    margin-inline-start: 0.5rem;
}

html[dir="rtl"] .highlight-link:hover::after,
html[dir="rtl"] .highlight-link:focus::after {
    transform: translateX(-4px);
}

html[dir="rtl"] .commitment-stat {
    right: auto;
    left: 2rem;
}


/* =========================================================
   08. Responsive Adjustments
========================================================= */

@media (max-width: 1199.98px) {
    .hero-content {
        max-width: 760px;
    }

    .highlight-card {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 991.98px) {
    .hero-section,
    .hero-overlay,
    .hero-image {
        min-height: 760px;
    }

    .hero-content {
        padding-top: 6rem;
        padding-bottom: 5rem;
    }

    .highlights-section {
        margin-top: 0;
        padding: 0;
    }

    .highlights-panel {
        box-shadow: none;
    }

    .highlight-card {
        min-height: auto;
        border-bottom: 1px solid var(--oc-border);
    }

    .highlight-card-bordered {
        border-right: 0;
        border-left: 0;
    }

    .commitment-section {
        padding: 5rem 0 6rem;
    }

    .commitment-media {
        min-height: auto;
        padding-bottom: 2rem;
    }

    .commitment-image {
        height: 420px;
    }

    .commitment-stat {
        right: 1.5rem;
        bottom: -1.5rem;
    }

    html[dir="rtl"] .commitment-stat {
        right: auto;
        left: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section,
    .hero-overlay,
    .hero-image {
        min-height: 680px;
    }

    .hero-overlay {
        background: linear-gradient( 180deg, rgba(0, 31, 41, 0.68) 0%, rgba(0, 31, 41, 0.88) 72%, rgba(0, 31, 41, 0.94) 100% );
    }

    html[dir="rtl"] .hero-overlay {
        background: linear-gradient( 180deg, rgba(0, 31, 41, 0.68) 0%, rgba(0, 31, 41, 0.88) 72%, rgba(0, 31, 41, 0.94) 100% );
    }

    .hero-content {
        padding-top: 5rem;
        padding-bottom: 4rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .hero-actions .btn {
            width: 100%;
        }

    .highlight-card {
        padding: 2.25rem 1.5rem;
    }

    .commitment-section {
        padding: 4rem 0 5rem;
    }

    .commitment-image {
        height: 340px;
    }

    .commitment-stat {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        margin-top: -0.5rem;
    }

    html[dir="rtl"] .commitment-stat {
        left: auto;
        right: auto;
    }
}

@media (max-width: 575.98px) {
    .section-eyebrow,
    .hero-eyebrow {
        font-size: 0.72rem;
        letter-spacing: 0.1em;
    }

    .hero-title {
        font-size: clamp(2.4rem, 13vw, 4rem);
    }

    .hero-description {
        font-size: 1rem;
    }

    .btn-brand-primary,
    .btn-brand-secondary,
    .btn-brand-outline {
        padding: 0.8rem 1.25rem;
        font-size: 0.95rem;
    }

    .highlight-title {
        font-size: 1.55rem;
    }

    .commitment-image {
        height: 300px;
    }
}

/*=========================================*/
/* تغییر اسلاید شطرنجی */
/*=========================================*/
/*=========================================*/
/* Tile Reveal Transition */
/*=========================================*/

/*=========================================*/
/* Tile Reveal Transition - Improved */
/*=========================================*/

.oc-tile-reveal-layer {
    position: absolute;
    inset: 0;
    /* این لایه باید از همه اجزای داخل اسلایدر بالاتر باشد */
    z-index: 99;
    display: grid;
    overflow: hidden;
    pointer-events: none;
    /* جلوگیری از اثر RTL روی ترتیب ستون‌های Grid */
    direction: ltr;
}

.oc-reveal-tile {
    position: relative;
    overflow: hidden;
    opacity: 0;
    /* مقیاس بزرگتر برای وضوح حرکت */
    transform: scale(1.15);
    will-change: opacity, transform;
    direction: ltr;
}

.oc-reveal-tile__image {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    /* بسیار مهم: عرض و طول باید دقیقا برابر کل هیرو باشد */
    width: 100vw;
    height: 100%;
    max-width: none !important;
    object-fit: cover;
}

@keyframes ocTileRevealIn {
    from {
        opacity: 0;
        transform: scale(1.15);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.oc-reveal-tile.animate {
    /* زمان انیمیشن را به 1 ثانیه افزایش دادیم تا حرکت نرم دیده شود */
    animation: ocTileRevealIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* هماهنگی با حالت موبایل */
@media (max-width: 767.98px) {
    .oc-reveal-tile__image {
        object-fit: contain;
        object-position: top center;
        width: 100%;
        background-color: #001f29;
    }
}





/*=========================================*/
/* Optimized Hero Slider for Mobile & Desktop */
/*=========================================*/

.oc-hero-slider,
.oc-hero-slider__inner,
.oc-hero-slider__item {
    width: 100%;
    height: 100%;
}

.oc-hero-slider {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.oc-hero-slider__item {
    position: relative;
    height: 100%;
}

.oc-hero-slider__image {
    display: block;
    width: 100%;
    height: 100%;
    /* تضمین ارتفاع کامل در دسکتاپ */
    min-height: calc(100vh - 88px);
    object-fit: cover;
    object-position: center; /* مرکز تصویر را نگه می‌دارد */
    /*transform: scale(1.02);*/
}

/* Smooth fade transition for Hero Carousel */
.oc-hero-slider.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

    .oc-hero-slider.carousel-fade .carousel-item.active,
    .oc-hero-slider.carousel-fade .carousel-item-next.carousel-item-start,
    .oc-hero-slider.carousel-fade .carousel-item-prev.carousel-item-end {
        opacity: 1;
    }

/*.oc-hero-slider.carousel-fade .oc-hero-slider__image {
    transform: scale(1.04);
    transition: transform 5s ease-out;
}

.oc-hero-slider.carousel-fade .carousel-item.active .oc-hero-slider__image {
    transform: scale(1);
}*/

/* اصلاح نمایش در موبایل */
@media (max-width: 767.98px) {
    .hero-section {
        min-height: 100vh !important;
        display: flex;
        flex-direction: column;
        position: relative;
    }

    .oc-hero-slider,
    .oc-hero-slider__inner,
    .oc-hero-slider__item {
        min-height: 100vh;
    }

    .oc-hero-slider__image {
        width: 100%;
        height: 100%;
        min-height: 100vh;
        object-fit: contain;
        object-position: top center;
        background-color: #001f29;
        transform: none;
    }

    .hero-overlay {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center; /* به جای flex-end */
        justify-content: center;
        padding: 1rem;
        background: linear-gradient( 180deg, rgba(0, 31, 41, 0.20) 0%, rgba(0, 31, 41, 0.60) 45%, rgba(0, 31, 41, 0.85) 100% ) !important;
    }

        .hero-overlay .container-fluid,
        .hero-overlay .row,
        .hero-overlay .col-xl-7,
        .hero-overlay .hero-content {
            height: auto !important;
            min-height: 0 !important;
        }

        .hero-overlay .row {
            width: 100%;
            margin: 0;
            align-items: center !important;
        }

    .hero-content {
        text-align: center;
        margin-top: 0;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: .75rem;
    }

    /*.oc-hero-slider.carousel-fade .oc-hero-slider__image {
        transform: none;
    }*/
}

