

/* --- Global Theme Variables --- */
:root {
    --primary-dark: #002223;
    --secondary-dark: #003738;
    --cream-bg: #FFFAF0;
    --white: #FFFFFF;
}

body {
    background-color: var(--cream-bg);
    color: var(--primary-dark);
    direction: rtl; /* Right-to-Left for Persian */
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
}

/* Typography Basics */
h1 {
    text-align: center;
    margin: 40px 0;
    font-size: 2rem;
    color: var(--primary-dark);
    position: relative;
}

h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-dark);
    margin: 10px auto;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- 1. Hero Slider Section --- */
.hero-wrapper {
    position: relative;
    width: 100%;
    /* 1. Fluid scaling instead of a locked 500px height prevents empty gaps */
    aspect-ratio: 16 / 6; 
    min-height: 420px;   /* Ensures a nice minimum height on narrower windows */
    margin-top: 0;       
    overflow: hidden;
}

.slider {
    display: flex;
    overflow-x: hidden;
    position: relative;
    gap: 0;
    width: 100%;
    height: 100%; /* Fill wrapper */
    scroll-behavior: smooth;
}

.slider > div {
    min-width: 100%;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: var(--cream-bg);
}

.slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;    /* Fills the banner seamlessly without any background colors */
    z-index: -1;
}

/* 2. 🌟 REMOVE NAVBAR SPACE (FIX MARGIN COLLAPSE) */
.slider h1 { 
    color: var(--cream-bg); 
    margin-top: 0;        /* Overrides global 40px top margin to snap the slider flush with the navbar */
    margin-bottom: 10px; 
    z-index: 2;
}

.slider p { max-width: 600px; margin-bottom: 25px; z-index: 2; font-size: 1.1rem;}

.slider a {
    background-color: var(--cream-bg);
    color: var(--primary-dark);
    padding: 12px 35px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 2;
}

.slider a:hover {
    background-color: var(--secondary-dark);
    color: var(--cream-bg);
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 99;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 250, 240, 0.4);
    border: 1px solid var(--cream-bg);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #FFFAF0;
    box-shadow: 0 0 10px rgba(255, 250, 240, 0.8);
    transform: scale(1.2);
}

/* --- 2. Services Section (Carousel) --- */
.services-wrapper {
    padding: 40px 20px; 
    
    /* 🌟 THE FIX: Changed from 1200px to 95%. 
       This tells the grid to stretch out and always stay exactly 2.5% away from the screen's left and right borders! */
    max-width: 95%;     
    
    margin: 0 auto;
    direction: rtl;
    text-align: center;
    background-color: var(--cream-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    
    /* 🌟 OPTIONAL: Shrinks the empty space between the individual cards */
    gap: 15px; 
    
    margin-bottom: 30px;
}

/* Individual Card Styling */
.product-card {
    position: relative;     /* REQUIRED: This tells the badge where (0,0) is */
    overflow: hidden;      /* REQUIRED: This clips the badge so it looks like a ribbon */
    
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sale-badge {
    position: absolute;
    top: 12px;             /* Adjusted for a tighter fit */
    left: -35px;           /* Adjusted to center the rotation on the corner */
    background: #f1c40f;
    color: #000;
    width: 120px;
    transform: rotate(-45deg);
    text-align: center;
    font-weight: bold;
    font-size: 0.85rem;
    z-index: 10;           /* Ensures it stays above the image */
    
    /* Ensure no hidden states exist */
    display: block;        
    opacity: 1;            
    visibility: visible;
}


.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--secondary-dark);
}

.product-card img {
    width: 100%;
    height: 200px;        /* Keeps your grid beautifully aligned */
    object-fit: contain;  /* 🌟 THE FIX: Shrinks the image until 100% of it is visible, borders and all */
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: var(--white); /* Blends any leftover empty space seamlessly with the card */
}

.product-card a {
    font-family: inherit;
    background: var(--primary-dark);
    color: var(--cream-bg);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: 0.3s;

    /* IMPORTANT ADDITIONS FOR ANCHOR TAGS: */
    display: block;          /* Makes it take up the full width and respect padding */
    text-decoration: none;   /* Removes the default underline */
    box-sizing: border-box;  /* Ensures padding doesn't push the width past 100% */
}

.product-card a:hover {
    background-color: var(--secondary-dark);
    color: var(--cream-bg); /* Ensures text stays white on hover */
}

/* Nav Buttons for Carousel */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    border-radius: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.nav-btn img { 
    width: 30px; 

}

.btn-right { right: -15px; }
.btn-left { left: -15px; }

.nav-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background-color: var(--secondary-dark);
}

.more-link {
    text-align: center; /* Centers the button */
    margin-top: 40px;   /* Adds space between products and button */
}

.more-link a {
    display: inline-block;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-dark); /* Dark Text */
    border: 2px solid var(--primary-dark); /* Dark Border */
    padding: 10px 40px;
    border-radius: 50px; /* Rounded pill shape */
    transition: all 0.3s ease;
}

/* Hover Effect: Fills with color */
.more-link a:hover {
    background-color: var(--primary-dark);
    color: var(--cream-bg);
    transform: translateY(-3px); /* Slight lift */
    box-shadow: 0 4px 10px rgba(0, 34, 35, 0.2);
}

/* --- 3. Your Print Section (Split Layout) --- */
.your-print {
    display: flex;
    flex-wrap: wrap; /* Allows stacking on mobile */
    padding: 60px 5%;
    align-items: center;
    background-color: var(--primary-dark);
    color: var(--cream-bg);
}

.your-print h1 { color: var(--cream-bg); width: 100%; margin-top: 0; }

.col-right {text-align: justify; line-height: 2; font-size: 1rem; flex: 1; min-width: 300px; padding: 20px; }
.col-left { flex: 1; min-width: 300px; text-align: center;}

.col-right a {
    display: block;                 /* 1. Allows block-level margin rules to apply */
    width: fit-content;             /* 2. Shrinks the button width tightly around the text */
    margin: 35px auto;              /* 3. Auto handles perfect left/right center balance safely */
    background-color: var(--cream-bg);
    color: var(--primary-dark);
    padding: 12px 35px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
}

.col-right a:hover {
    background-color: var(--secondary-dark);
    color: var(--cream-bg);
    transform: translateY(-2px);
}

/* 🌟 PROFESSIONAL CENTERED DARK BOX */
.strory-strong {
    width: fit-content;             /* Shrinks background box to match your longest sentence */
    max-width: 100%;                /* Safety guard: Prevents overflowing on small phone screens */
    margin: 30px auto;              /* Perfectly centers the entire box inside the story column */
    box-sizing: border-box;
}

.strory-strong strong {
    text-align: center;
    display: block;
    font-size: 1.3rem;              /* Balanced font size hierarchy */
    color: var(--secondary-dark);
    margin-bottom: 8px;
    line-height: 1.6;
}

.col-left img {
    width: 100%;
    max-width: 500px;
    border-radius: 30px;
    border: 3px solid var(--secondary-dark);
}

/* --- 4. Common Questions (FAQ) --- */
.common-questions {
    padding: 60px 5%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.common-questions h1 {
    width: 100%;
    margin-bottom: 40px;
}

.common-questions .col-left, .common-questions .col-right {
    flex: 1;
    min-width: 300px;
    padding: 10px;
}

/* Container for the question to align text and icon */
.question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: #eee;
    padding: 15px;
    margin-top: 5px;
    border-right: 4px solid var(--secondary-dark);
    transition: background 0.3s ease;
}

/* Style for your Vector.svg icon */
.question img {
    width: 15px;
    height: 15px;
    transition: transform 0.4s ease; /* This makes the rotation smooth */
    margin-left: 10px;
    order: 2; /* Ensures it stays on the left side in RTL */
}

/* This class will be added by JavaScript */
.question.active img {
    transform: rotate(180deg);
}

.answer-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent; /* Changed from white to transparent */
    overflow: hidden;
    /* Remove the border from here */
}

/* 2. The Inner Content - Add the background and border here instead */
.answer-content {
    min-height: 0;
    padding: 20px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    
    /* Move background and border inside */
    background: var(--white); 
    border-right: 4px solid #ddd;
    border-bottom: 1px solid #eee; /* Optional: adds definition at the bottom */
}

/* 3. When active */
.question.active + .answer-wrapper {
    grid-template-rows: 1fr;
}

.question.active + .answer-wrapper .answer-content {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

/* ------------------------------------------------ */
/* ----------- RESPONSIVE MEDIA QUERIES ----------- */
/* ------------------------------------------------ */

@media screen and (max-width: 1024px) {
    .hero-wrapper {
        height: auto;
        min-height: 350px; /* Safely overrides the desktop 420px */
    }
    
    .product-card {
        flex: 0 0 calc((100% - 20px) / 2.3); 
    }
}


/* Mobile (Max Width: 768px) */
@media screen and (max-width: 768px) {
    /* General */
    h1 { font-size: 1.5rem; margin: 25px 0; }

    /* Hero Section */
    .hero-wrapper {
        margin-top: 0 !important;
        height: auto; 
        min-height: unset;    /* 🌟 Removes the forced tall height that was creating the gaps */
        aspect-ratio: 16 / 7; /* 🌟 Changes the box shape to a wide rectangle to hug the image perfectly */
    }

    .slider {
        height: 100%;
    }

    .slider img {
        object-fit: contain; 
        object-position: top center;
        
    }

    /* 🌟 NEW: Target the dots on mobile to pull them up closer to the image */
    .slider-dots {
        bottom: 5px; /* Shrinks the gap between the image and the dots */
        padding: 5px 12px; /* Makes the background pill slightly more compact for mobile */
    }
    
    /* Make the text slightly smaller to fit the shorter slider */
    .slider h1 { 
        font-size: 1.3rem; 
        margin-bottom: 5px;
    }
    .slider p { 
        font-size: 0.85rem; 
        padding: 0 10px; 
        margin-bottom: 15px;
    }
    .slider a {
        padding: 8px 25px;
        font-size: 0.9rem;
    }
    
    
    /* Mobile (Max Width: 768px) */

    .products-list { 
        width: 100%; 
    }
    
    .product-card {
        /* --- UPDATE THIS LINE --- */
        flex: 0 0 82%; /* Shows 1 full item + a healthy peek of the next one */
    }

    /* Hide the arrow buttons on mobile - Users prefer swiping */
    .nav-btn { display: none; } 
    
    /* Your Print & FAQ Sections */
    .your-print, .common-questions {
        flex-direction: column; /* Stack vertically */
        padding: 30px 5%;
    }
    
    .col-right, .col-left {
        min-width: 100%; /* Take full width */
        padding: 10px 0;
    }
    
    /* Fix image order on mobile if needed */
    .your-print .col-left {
        order: -1; /* Puts image above text on mobile if desired */
        margin-bottom: 20px;
    }
    
    .common-questions .col-left {
        display: none; /* Optional: Hide big side image in FAQ on mobile to save space */
    }

    .common-questions {
        flex-direction: column; /* Stack image and questions */
        padding: 40px 20px;
    }

    .common-questions .col-left {
        width: 100%;
        margin-bottom: 30px;
        text-align: center;
    }

    .common-questions .col-left img {
        max-width: 250px; /* Make the side image smaller on mobile */
    }

    .common-questions .col-right {
        width: 100%;
    }

    .question {
        font-size: 0.95rem; /* Slightly smaller text for mobile */
        padding: 15px;
    }

    .answer-wrapper {
        transition-duration: 0.3s; /* Faster on mobile */
    }

}










