/* style.css */

/* -------------------------------------------------------------------------- */
/*                                  VARIABLES                                 */
/* -------------------------------------------------------------------------- */
:root {
    /* Complementary Color Scheme: Deep Blue & Gold/Orange */
    --primary-color: #0A2342; /* Deep, sophisticated blue */
    --primary-color-darker: #06172B;
    --secondary-color: #D4AF37; /* Rich gold */
    --secondary-color-alt: #FF8C00; /* Warmer orange for accents */
    --accent-color: var(--secondary-color-alt);

    --text-color: #333333; /* Dark gray for readability */
    --text-color-light: #F8F9FA; /* Off-white for dark backgrounds */
    --heading-color: var(--primary-color);
    --link-color: var(--secondary-color);
    --link-hover-color: var(--secondary-color-alt);

    --background-light: #F8F9FA; /* Light gray / Off-white */
    --background-medium: #E9ECEF;
    --background-dark: #1A202C; /* Very dark blue/gray for footer/contrast */
    --card-background: #FFFFFF;
    
    --border-color: #DEE2E6;
    --border-color-light: #CED4DA;

    --font-primary: 'Archivo Black', 'Cairo', sans-serif; /* For headings */
    --font-secondary: 'Roboto', 'Cairo', sans-serif; /* For body text */

    --header-height: 80px;

    --box-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
    --text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    --text-shadow-light: 1px 1px 2px rgba(0,0,0,0.5); /* For light text on complex backgrounds */

    --transition-speed: 0.3s;
    --transition-cubic: cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Bouncy */
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;

    --container-width: 1200px;
    --container-padding: 20px;

    /* For rgba fallbacks or direct use where calc isn't needed for opacity */
    --primary-color-rgb: 10, 35, 66;
    --secondary-color-rgb: 212, 175, 55;
    --secondary-color-alt-rgb: 255, 140, 0;
}

/* -------------------------------------------------------------------------- */
/*                                 BASE STYLES                                */
/* -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
    font-size: 16px; /* Adaptive typography base */
}

body {
    font-family: var(--font-secondary);
    color: var(--text-color);
    background-color: var(--background-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll */
    direction: rtl; /* For Arabic */
}

.main-container {
    overflow-x: hidden;
}

/* For pages like privacy, terms - ensuring content is below fixed header */
.page-content-padding {
    padding-top: calc(var(--header-height) + 40px); /* Header height + extra space */
    padding-bottom: 60px;
}
.page-content-padding .container h1 {
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
}
.page-content-padding .container p,
.page-content-padding .container ul li {
    margin-bottom: 1.5em;
    font-size: 1.1rem;
    color: var(--text-color);
}
.page-content-padding .container ul {
    list-style: disc;
    padding-right: 20px; /* RTL padding */
}


/* -------------------------------------------------------------------------- */
/*                                TYPOGRAPHY                                  */
/* -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--heading-color);
    margin-top: 0;
    margin-bottom: 0.75em;
    line-height: 1.3;
    font-weight: 400; /* Archivo Black is inherently bold */
}
/* Ensure Roboto gets weight if used in headings directly */
h1.roboto, h2.roboto, h3.roboto { font-weight: 700; }


h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); } /* Adaptive sizing */
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }

p {
    margin-top: 0;
    margin-bottom: 1.5em;
    font-size: 1rem; /* Base size */
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

strong {
    font-weight: 700; /* Roboto bold */
}

/* -------------------------------------------------------------------------- */
/*                                  LAYOUT                                    */
/* -------------------------------------------------------------------------- */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.section-padding {
    padding-top: clamp(60px, 8vh, 100px);
    padding-bottom: clamp(60px, 8vh, 100px);
}

.bg-light {
    background-color: var(--background-light);
}
.bg-dark {
    background-color: var(--background-dark);
    color: var(--text-color-light);
}
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark p {
    color: var(--text-color-light);
}
.bg-dark a {
    color: var(--secondary-color-alt);
}
.bg-dark a:hover {
    color: var(--text-color-light);
}


.content-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.column {
    flex: 1;
    min-width: 300px; /* Prevent excessive shrinking */
}

.column.is-two-thirds {
    flex-basis: 66.66%;
}
@media (max-width: 768px) {
    .column.is-two-thirds {
        flex-basis: 100%;
    }
}


/* -------------------------------------------------------------------------- */
/*                                  HEADER                                    */
/* -------------------------------------------------------------------------- */
.site-header {
    background-color: rgba(255, 255, 255, 0.95); /* Slightly transparent */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0 var(--container-padding);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    box-shadow: var(--box-shadow-sm);
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.site-header .logo a {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: normal; /* Archivo Black is bold */
}

.main-navigation .nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
}

.main-navigation .nav-list a {
    font-family: var(--font-secondary);
    font-weight: 700; /* Roboto bold */
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 0;
    position: relative;
    transition: color var(--transition-speed) ease;
}

.main-navigation .nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0; /* RTL */
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    transition: width var(--transition-speed) var(--transition-cubic);
}

.main-navigation .nav-list a:hover,
.main-navigation .nav-list a.active { /* Assuming JS adds 'active' class */
    color: var(--secondary-color);
}

.main-navigation .nav-list a:hover::after,
.main-navigation .nav-list a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Above nav list for mobile */
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    position: relative;
    transition: background-color var(--transition-speed) ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: transform var(--transition-speed) ease, top var(--transition-speed) ease, bottom var(--transition-speed) ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* Mobile Menu Styles */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }
    .main-navigation .nav-list {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen RTL */
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        padding: calc(var(--header-height) + 20px) 30px 30px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1); /* Shadow on the left for RTL */
        transition: right var(--transition-speed) ease-in-out;
        gap: 0;
    }
    .main-navigation .nav-list.active {
        right: 0; /* Slide in from right */
    }
    .main-navigation .nav-list li {
        width: 100%;
    }
    .main-navigation .nav-list a {
        display: block;
        padding: 15px 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-color-light);
    }
    .main-navigation .nav-list li:last-child a {
        border-bottom: none;
    }
    .main-navigation .nav-list a::after {
        display: none; /* Remove underline for mobile nav items */
    }

    /* Hamburger animation when menu is active */
    .menu-toggle[aria-expanded="true"] .hamburger {
        background-color: transparent; /* Middle line disappears */
    }
    .menu-toggle[aria-expanded="true"] .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }
    .menu-toggle[aria-expanded="true"] .hamburger::after {
        bottom: 0;
        transform: rotate(-45deg);
    }
}


/* -------------------------------------------------------------------------- */
/*                                HERO SECTION                                */
/* -------------------------------------------------------------------------- */
.hero-section {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-color-light); /* IMPORTANT: Hero text is white */
    padding-top: var(--header-height); /* Offset for fixed header */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7)); /* Dark overlay for text readability */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    margin-bottom: 0.5em;
    color: #FFFFFF !important; /* Ensure white color for title */
    text-shadow: var(--text-shadow-light);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 1.5em;
    color: #FFFFFF !important; /* Ensure white color for subtitle */
    font-weight: 400; /* Roboto regular */
    text-shadow: var(--text-shadow-light);
}

/* -------------------------------------------------------------------------- */
/*                            GENERAL SECTION STYLING                         */
/* -------------------------------------------------------------------------- */
.section-title {
    text-align: center;
    margin-bottom: 1em; /* Increased for better separation */
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.5em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}
.section-title::after { /* "Hand-drawn" underline */
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3em; /* Increased for better separation */
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
}

/* -------------------------------------------------------------------------- */
/*                                   BUTTONS (GLOBAL)                         */
/* -------------------------------------------------------------------------- */
.cta-button, .cta-button-secondary, button, input[type="submit"], input[type="button"] {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 700; /* Roboto bold */
    text-align: center;
    text-decoration: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-cubic);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden; /* For "drawn" effect */
    z-index: 1;
}

.cta-button { /* Primary Button */
    background-color: var(--secondary-color);
    color: var(--primary-color-darker); /* Good contrast with gold */
    border-color: var(--secondary-color);
}
.cta-button:hover {
    background-color: var(--secondary-color-alt);
    border-color: var(--secondary-color-alt);
    color: var(--primary-color);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.cta-button-secondary { /* Secondary Button */
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.cta-button-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* "Drawn" effect on hover - subtle */
.cta-button::before, .cta-button-secondary::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0; /* RTL */
    width: 0;
    height: 100%;
    background-color: rgba(255,255,255,0.2);
    transition: width var(--transition-speed) ease-out;
    z-index: -1;
}
.cta-button:hover::before, .cta-button-secondary:hover::before {
    width: 100%;
    right: auto; /* RTL */
    left: 0;    /* RTL */
}

/* -------------------------------------------------------------------------- */
/*                                    CARDS                                   */
/* -------------------------------------------------------------------------- */
.card {
    background-color: var(--card-background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Make cards in a row same height */
    text-align: right; /* Default for RTL */
}

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

.card-image, .image-container { /* Ensure these are used for image wrappers in cards */
    width: 100%;
    overflow: hidden;
    display: flex; /* For centering the image if it's smaller than container */
    flex-direction: column; /* As per strict requirement */
    align-items: center; /* As per strict requirement */
    justify-content: center; /* Added for better centering */
    background-color: var(--background-medium); /* Placeholder bg */
}

.card-image img, .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crucial for consistent image display */
    display: block; /* Remove bottom space */
    transition: transform var(--transition-speed) ease;
}

.card:hover .card-image img, .card:hover .image-container img {
    transform: scale(1.05);
}

.card-content {
    padding: clamp(20px, 3vw, 30px);
    flex-grow: 1; /* Allows content to fill space, useful for equal height cards */
    display: flex;
    flex-direction: column;
}
.card-content > *:last-child {
    margin-bottom: 0;
}
.card-content h3, .card-content .info-card-title, .card-content .project-title, .card-content .blog-post-title,
.card-content .team-member-name, .card-content .pricing-title, .card-content .resource-title {
    margin-bottom: 0.5em;
    color: var(--primary-color);
    font-size: 1.4rem;
}
.card-content p {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 1em;
    flex-grow: 1; /* Pushes links/buttons to bottom */
}

.learn-more-link, .read-more-link {
    display: inline-block;
    margin-top: auto; /* Pushes to the bottom if content above allows */
    color: var(--secondary-color-alt);
    font-weight: 700;
    text-decoration: none;
    transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
    align-self: flex-start; /* RTL: align to right */
}
.learn-more-link::after, .read-more-link::after { /* Arrow for RTL */
    content: " \2190"; /* Left arrow */
    font-family: sans-serif; /* Ensure arrow renders */
    margin-right: 5px; /* RTL */
    transition: transform 0.2s ease-out;
    display: inline-block;
}
.learn-more-link:hover, .read-more-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
.learn-more-link:hover::after, .read-more-link:hover::after {
    transform: translateX(-3px); /* RTL */
}


/* -------------------------------------------------------------------------- */
/*                             ABOUT SECTION                                 */
/* -------------------------------------------------------------------------- */
#about .image-container img {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
}
#about .content-columns {
    align-items: center; /* Vertically align image and text */
}

/* Statistical Widgets */
.stats-widgets-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    margin-top: 50px;
    text-align: center;
}
.stat-widget {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-sm);
    flex: 1;
    min-width: 200px;
    max-width: 300px; /* Prevent them from becoming too wide */
    transition: transform 0.3s ease;
}
.stat-widget:hover {
    transform: translateY(-5px);
}
.stat-value {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--secondary-color);
    margin-bottom: 0.2em;
}
.stat-label {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0;
}

/* -------------------------------------------------------------------------- */
/*                        OPPORTUNITIES (ACCORDION) SECTION                   */
/* -------------------------------------------------------------------------- */
.accordion-container {
    max-width: 900px;
    margin: 0 auto;
}
.accordion-item {
    background-color: var(--card-background);
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-sm);
    overflow: hidden;
}
.accordion-header {
    background-color: transparent;
    border: none;
    padding: 20px 25px;
    width: 100%;
    text-align: right; /* RTL */
    font-family: var(--font-primary);
    font-size: 1.3rem;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color var(--transition-speed) ease;
}
.accordion-header:hover {
    background-color: var(--background-medium);
}
.accordion-icon {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
    transition: transform var(--transition-speed) var(--transition-cubic);
}
.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}
.accordion-content {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease-in-out, padding var(--transition-speed) ease-in-out;
}
.accordion-item.active .accordion-content {
    padding: 20px 25px;
    max-height: 1000px; /* Adjust as needed for content */
}
.accordion-content p {
    font-size: 0.95rem;
    color: var(--text-color);
}
.accordion-content .image-container img {
    border-radius: var(--border-radius);
    margin-top: 15px;
}
.accordion-content .content-columns {
    align-items: flex-start; /* Align columns at the top */
}
.accordion-content .image-container {
    height: 250px; /* Consistent height for images in accordion */
}

/* -------------------------------------------------------------------------- */
/*                       EXPERTS / TEAM (CAROUSEL) SECTION                      */
/* -------------------------------------------------------------------------- */
.team-carousel-container, .projects-carousel-container, .content-carousel-container {
    position: relative;
}
.content-carousel {
    display: flex;
    overflow-x: auto; /* Will be enhanced by JS for smooth scroll/snap */
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 20px; /* For scrollbar or shadow */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.content-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.card.team-card, .card.project-card, .bts-item {
    flex: 0 0 clamp(280px, 80vw, 350px); /* Card width control for carousel */
    scroll-snap-align: start;
}
/* Ensure content within these carousel cards is centered if needed by design */
.card.team-card .card-content, .card.project-card .card-content, .bts-item p {
    text-align: center; /* For centering text content in these specific cards */
}


.team-card .card-image, .team-card .image-container {
    height: 180px; /* Fixed height for team member images */
    width: 180px; /* For circular shape */
    border-radius: 50%; /* Circular images */
    margin: 0 auto 15px auto; /* Center image container */
}
.team-card .card-image img, .team-card .image-container img {
    border-radius: 50%;
}

.team-member-name {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.3em;
}
.team-member-title {
    font-size: 1rem;
    color: var(--secondary-color-alt);
    font-weight: 700;
    margin-bottom: 0.8em;
}
.team-card .card-content p:not(.team-member-title) {
    font-size: 0.9rem;
    text-align: center; /* Ensure paragraphs are also centered */
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(var(--primary-color-rgb), 0.8);
    color: var(--text-color-light);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color var(--transition-speed) ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-prev:hover, .carousel-next:hover {
    background-color: var(--primary-color);
}
.carousel-prev { right: -20px; } /* RTL */
.carousel-next { left: -20px; } /* RTL */

@media (max-width: 768px) {
    .carousel-prev { right: 5px; } /* RTL */
    .carousel-next { left: 5px; } /* RTL */
}

/* -------------------------------------------------------------------------- */
/*                        SERVICES / PRICING SECTION                          */
/* -------------------------------------------------------------------------- */
.pricing-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch; /* Make cards same height */
}
.pricing-card .card-image, .pricing-card .image-container {
    height: 200px; /* Fixed height for pricing card images */
}
.pricing-card .card-content {
    text-align: center;
}
.pricing-title {
    font-size: 1.6rem;
    color: var(--primary-color);
}
.pricing-description {
    font-size: 0.95rem;
    margin-bottom: 1.5em;
    min-height: 80px; /* Ensure some space for description */
}
.pricing-price {
    font-size: 1.8rem;
    font-family: var(--font-primary);
    color: var(--secondary-color);
    margin-bottom: 1.5em;
    font-weight: normal; /* Archivo Black is bold */
}
.pricing-card .cta-button, .pricing-card .cta-button-secondary {
    width: 100%;
    margin-top: auto; /* Push button to bottom */
}
.featured-package {
    border: 3px solid var(--secondary-color);
    transform: scale(1.02); /* Slightly larger */
    box-shadow: var(--box-shadow-lg);
}
.featured-package:hover {
    transform: scale(1.02) translateY(-8px); /* Keep scale on hover */
}
.featured-package .pricing-title {
    color: var(--secondary-color-alt);
}

/* -------------------------------------------------------------------------- */
/*                        TEAM SECTION (INFO CARDS)                           */
/* -------------------------------------------------------------------------- */
.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.info-card .card-image, .info-card .image-container {
    height: 280px; /* Fixed height for team member images */
}
.info-card .card-content {
    text-align: center;
}
.info-card-title {
    font-size: 1.5rem;
}
.info-card-subtitle {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 0.8em;
}

/* -------------------------------------------------------------------------- */
/*                       PROJECTS SECTION (CASE STUDIES)                      */
/* -------------------------------------------------------------------------- */
.project-card .card-image, .project-card .image-container {
    height: 220px; /* Fixed height for project images */
}
.project-card .card-content {
    text-align: right; /* Default RTL, links align with this */
}
.project-card .learn-more-link {
    align-self: flex-start; /* Aligns to right in RTL */
}
.project-title {
    font-size: 1.3rem;
}
.project-category {
    font-size: 0.9rem;
    color: var(--secondary-color-alt);
    font-weight: 700;
    margin-bottom: 0.5em;
    text-transform: uppercase;
}

/* -------------------------------------------------------------------------- */
/*                                BLOG SECTION                               */
/* -------------------------------------------------------------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.blog-post-card .card-image, .blog-post-card .image-container {
    height: 200px; /* Fixed height for blog post images */
}
.blog-post-card .card-content {
    text-align: right; /* Default RTL */
}
.blog-post-card .read-more-link {
    align-self: flex-start; /* Aligns to right in RTL */
}
.blog-post-title {
    font-size: 1.4rem;
    min-height: 3em; /* Ensure space for 2 lines of title */
}
.blog-post-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 1em;
}

/* -------------------------------------------------------------------------- */
/*                          BEHIND THE SCENES SECTION                         */
/* -------------------------------------------------------------------------- */
.bts-item { /* Styles for items in the content carousel */
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow-sm);
    text-align: center;
}
.bts-item .image-container { /* If using image-container for bts images */
    height: 250px;
}
.bts-item img { /* If img is direct child */
    width: 100%;
    height: 250px; 
    object-fit: cover;
    display: block;
}
.bts-item p {
    padding: 15px;
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 0;
}

/* -------------------------------------------------------------------------- */
/*                                PRESS SECTION                               */
/* -------------------------------------------------------------------------- */
.press-logos-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 40px;
}
.press-logo {
    text-align: center;
    flex-basis: 200px; /* Control width of each logo item */
}
.press-logo img {
    max-width: 150px;
    height: auto;
    margin-bottom: 10px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter var(--transition-speed) ease, opacity var(--transition-speed) ease;
}
.press-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}
.press-logo p {
    font-size: 0.9rem;
    font-style: italic;
    color: #555;
    margin-bottom: 0;
}

/* -------------------------------------------------------------------------- */
/*                        EXTERNAL RESOURCES SECTION                          */
/* -------------------------------------------------------------------------- */
.external-resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}
.resource-card .card-content { 
    text-align: right; /* RTL */
}
.resource-title a {
    font-family: var(--font-primary);
    color: var(--primary-color);
    font-size: 1.2rem;
    text-decoration: none;
}
.resource-title a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}
.resource-description {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.6;
}

/* -------------------------------------------------------------------------- */
/*                                CONTACT FORM                                */
/* -------------------------------------------------------------------------- */
.contact-form-container {
    max-width: 700px;
    margin: 0 auto 40px auto;
    background-color: var(--card-background);
    padding: clamp(25px, 4vw, 40px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 700; /* Roboto bold */
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-align: right; /* RTL */
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="text"], /* For subject */
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    background-color: var(--background-light); /* Light background for fields */
    text-align: right; /* RTL */
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(var(--secondary-color-rgb), 0.3);
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}
.contact-form-container .cta-button {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}
.contact-details {
    text-align: center;
    margin-top: 40px;
}
.contact-details p {
    font-size: 1.1rem;
    margin-bottom: 0.8em;
    color: var(--text-color);
}
.contact-details strong {
    color: var(--primary-color);
}

/* -------------------------------------------------------------------------- */
/*                                   FOOTER                                   */
/* -------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--background-dark);
    color: var(--text-color-light);
    padding: 50px 0 20px 0;
    font-size: 0.95rem;
}
.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
}
.footer-column {
    flex: 1;
    min-width: 200px;
    text-align: right; /* RTL */
}
.footer-column h4 {
    font-family: var(--font-primary);
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 1.2em;
    position: relative;
    padding-bottom: 0.5em;
}
.footer-column h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0; /* RTL */
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color-alt);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-column ul li {
    margin-bottom: 10px;
}
.footer-column ul a {
    color: var(--text-color-light);
    text-decoration: none;
    transition: color var(--transition-speed) ease, padding-right var(--transition-speed) ease; /* RTL padding */
}
.footer-column ul a:hover {
    color: var(--secondary-color-alt);
    padding-right: 5px; /* RTL */
    text-decoration: underline;
}
.footer-bottom {
    text-align: center;
    width: 100%;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* Social links in footer (text-based) */
.social-links li a {
    display: inline-block; /* To allow padding/margin and better hover */
}


/* -------------------------------------------------------------------------- */
/*                              SUCCESS PAGE                                  */
/* -------------------------------------------------------------------------- */
body.success-page { /* Add this class to body on success.html */
    display: flex;
    flex-direction: column; 
    min-height: 100vh;
    background-color: var(--primary-color); /* Theme background */
    color: var(--text-color-light);
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
}
.success-container {
    text-align: center;
    padding: 40px var(--container-padding);
    max-width: 600px; /* Limit width */
}
.success-icon { 
    font-size: 5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}
.success-container h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--text-color-light); /* White text */
    margin-bottom: 0.5em;
}
.success-container p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-color-light); /* White text */
    margin-bottom: 1.5em;
}
.success-container .cta-button {
    background-color: var(--secondary-color);
    color: var(--primary-color-darker);
    border-color: var(--secondary-color);
    padding: 15px 40px;
    font-size: 1.1rem;
}
.success-container .cta-button:hover {
    background-color: var(--secondary-color-alt);
    border-color: var(--secondary-color-alt);
}

/* -------------------------------------------------------------------------- */
/*                              COOKIE POPUP                                  */
/* -------------------------------------------------------------------------- */
#cookiePopup p {
    font-family: var(--font-secondary); 
    color: #FFFFFF; 
    margin-bottom: 15px !important; /* Explicit margin, ensure it overrides */
}
#acceptCookie {
    font-family: var(--font-secondary); 
    background-color: var(--secondary-color);
    color: var(--primary-color-darker); 
    border: none; 
    padding: 10px 20px; 
    cursor: pointer; 
    border-radius: var(--border-radius-sm); 
    font-size: 0.9rem; 
    font-weight: bold;
    transition: background-color var(--transition-speed) ease;
}
#acceptCookie:hover {
    background-color: var(--secondary-color-alt);
}

/* -------------------------------------------------------------------------- */
/*                             ANIMATE ON SCROLL (Initial States)             */
/* -------------------------------------------------------------------------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible { /* Class added by JS */
    opacity: 1;
    transform: translateY(0);
}

/* Parallax effect placeholder - JS will handle this */
.parallax-background {
    background-attachment: fixed; /* Basic parallax, can be enhanced with JS */
}