/* Basic Styles */
:root {
    --primary-color: #007bff; /* A nice blue for CTAs and highlights */
    --secondary-color: #6c757d; /* A subtle grey for secondary text */
    --text-color: #333;
    --heading-color: #222;
    --background-color: #F1F1F1;
    --card-background: #ffffff;
    --border-color: #eee;
    --hero-overlay-color: rgba(0, 0, 0, 0.7); /* Slightly darker overlay for better text contrast */
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    direction: rtl; /* For right-to-left language */
    text-align: right; /* For right-to-left language */
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-weight: bold;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3; /* Darker shade on hover */
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Section Styling */
section {
    padding: 2rem 1rem;
    margin-bottom: 1rem;
    background-color: var(--background-color);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--heading-color);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(var(--hero-overlay-color), var(--hero-overlay-color)), url('{% static "images/chem_hero.jpg" %}') no-repeat center center/cover;
    color: #fff;
    padding: 4rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.hero-content {
    max-width: 900px;
    margin-bottom: 2rem;
}

.hero-content h1 {
    color: #fff;
    font-size: 2.8rem; /* Slightly larger for impact */
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Add text shadow for readability */
}

.hero-content p {
    font-size: 1.2rem; /* Slightly larger */
    margin-bottom: 2rem;
    max-width: 800px; /* Constrain width for better readability */
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.cta-primary, .cta-secondary {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.cta-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}

.cta-secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.cta-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    min-width: 120px;
}

.stat-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
}

.stat-text {
    font-size: 0.9rem;
}

/* Service Grid Section */
.services {
    background-color: var(--card-background);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Detailed Service Sections */
.service-detail {
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
}

.service-detail:last-of-type {
    border-bottom: none;
}

.service-detail.alt {
    background-color: var(--background-color);
}

.service-detail .content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.service-detail h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-detail p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.service-features li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-color);
    position: relative;
    padding-right: 25px; /* Space for icon */
}

.service-features li::before {
    content: '\f058'; /* Font Awesome check-circle icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    right: 0;
    top: 2px;
}

.service-action {
    text-align: center;
}

.action-card {
    background-color: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.service-detail.alt .action-card {
    background-color: #fff;
}

.action-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--heading-color);
}

.action-card p {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.2rem;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    gap: 0.5rem;
}

.action-button.phone {
    background-color: #28a745; /* Green for phone */
    color: #fff;
}

.action-button.phone:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.action-button.whatsapp {
    background-color: #25D366; /* WhatsApp green */
    color: #fff;
}

.action-button.whatsapp:hover {
    background-color: #1DA851;
    transform: translateY(-2px);
}

/* Journals Section */
.journals {
    background-color: var(--card-background);
}

.journals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.journal-category {
    background-color: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.journal-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--primary-color);
}

.journal-category h3 i {
    font-size: 1.8rem;
}

.journal-category ul {
    list-style: none;
    padding: 0;
}

.journal-category li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
    padding-right: 15px;
    position: relative;
}

.journal-category li::before {
    content: '\f0a9'; /* Font Awesome angle-double-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--secondary-color);
    position: absolute;
    right: 0;
    top: 2px;
}

/* Testimonials Section */
.testimonials {
    background-color: var(--background-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background-color: var(--card-background);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border-color);
}

.testimonial-card .quote-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.testimonial-card p {
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.testimonial-card .author {
    font-weight: bold;
    color: var(--heading-color);
    font-size: 0.9rem;
    text-align: left;
}

/* Tips Section */
.tips {
    background-color: var(--card-background);
}

.tips-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tip-card {
    background-color: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.tip-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.tip-card h3 i {
    font-size: 1.8rem;
}

.tip-card p {
    font-size: 0.95rem;
    color: var(--text-color);
}

/* FAQ Section */
.faq {
    background-color: var(--background-color);
}

.faq-item {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: var(--heading-color);
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f0f0f0;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: #f8f8f8;
    color: var(--text-color);
    font-size: 0.95rem;
}

.faq-item.active .faq-answer {
    max-height: 200px; /* Adjust as needed based on content length */
    padding-bottom: 1rem;
}

/* Contact Section */
.contact {
    background-color: var(--card-background);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-card {
    background-color: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.contact-card .icon-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-card .icon-wrapper.whatsapp {
    background-color: #25D366;
}

.contact-card .icon-wrapper.email {
    background-color: #dc3545; /* Red for email */
}

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.contact-link {
    font-size: 1rem;
    font-weight: bold;
    display: block;
    margin-top: 0.5rem;
}

/* Footer (Simple Placeholder, assuming base.html has main footer) */
.page-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    background-color: #333;
    color: #fff;
    font-size: 0.85rem;
    margin-top: 2rem;
}

.page-footer a {
    color: #fff;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    section {
        padding: 3rem 2rem;
    }

    .hero-content h1 {
        font-size: 4rem;
    }

    .hero-content p {
        font-size: 1.3rem;
    }

    .hero-cta {
        flex-direction: row;
    }

    .services-grid,
    .journals-grid,
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-detail .content-wrapper {
        flex-direction: row;
        align-items: center;
    }

    .service-detail .service-content {
        flex: 2;
    }

    .service-detail .service-action {
        flex: 1;
    }

    .action-buttons {
        flex-direction: row;
    }

    .testimonials-grid,
    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cta-buttons {
        flex-direction: row;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    section {
        padding: 4rem 2rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .journals-grid {
        grid-template-columns: repeat(2, 1fr); /* Stays 2 for desktop as requested */
    }

    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tips-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .process-grid {
        grid-template-columns: repeat(5, 1fr); /* 5 columns for desktop */
    }

    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Why Choose Us Section (reuses .services-grid and .service-card for consistency) */
.why-choose-us {
    background-color: var(--background-color);
}

/* Our Process Section */
.our-process {
    background-color: var(--card-background);
}

.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.process-step {
    background-color: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.process-step .step-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.process-step h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--heading-color);
}

.process-step p {
    font-size: 0.95rem;
    color: var(--text-color);
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(rgba(0, 123, 255, 0.8), rgba(0, 123, 255, 0.8)), url('{% static "images/cta_bg.jpg" %}') no-repeat center center/cover;
    color: #fff;
    padding: 4rem 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

/* Blog/News Section */
.blog-news {
    background-color: var(--background-color);
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-card {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-card h3 {
    font-size: 1.3rem;
    margin: 1rem 1.5rem 0.5rem;
    color: var(--heading-color);
}

.blog-card p {
    font-size: 0.95rem;
    color: var(--text-color);
    margin: 0 1.5rem 1rem;
}

.blog-card .read-more {
    display: block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.blog-card .read-more:hover {
    background-color: #0056b3;
}

.blog-card .read-more i {
    margin-right: 0.5rem;
    transform: rotate(180deg); /* Flip arrow for RTL */
} 