/* style.css */

/* -----------------------------------------------------------------------------
   1. CSS Variables & Global Styles
----------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@700;800&family=Rubik:wght@400;500;700&display=swap');

:root {
    --primary-color: #0D47A1; /* Deep Blue - Corporate, trustworthy */
    --primary-color-dark: #093170;
    --primary-color-light: #155AB8;
    --secondary-color: #FFA000; /* Amber/Orange - Complementary, vibrant accent */
    --secondary-color-dark: #D48400;
    --secondary-color-light: #FFB02A;
    
    --text-color: #333333; /* Dark grey for body text */
    --text-color-light: #FFFFFF;
    --text-color-medium: #555555;
    --text-color-muted: #777777;
    --text-on-primary: #FFFFFF;
    --text-on-secondary: #212121;

    --background-color: #FFFFFF;
    --background-color-light: #F5F7FA; /* Light grey for alternate sections */
    --background-color-dark: #22272A; /* Footer & dark elements */

    --heading-font: 'Manrope', 'Cairo', sans-serif; /* Added Cairo for Arabic */
    --body-font: 'Rubik', 'Tajawal', sans-serif; /* Added Tajawal for Arabic */

    --border-radius-small: 4px;
    --border-radius-medium: 8px;
    --border-radius-large: 12px;
    
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 8px 25px rgba(0, 0, 0, 0.12);

    --navbar-height: 5rem; /* Approx. Bulma default */
    --transition-speed: 0.3s;
    --transition-easing: ease-in-out;
}

/* Bulma Variable Overrides */
:root {
    --bulma-primary-h: 210; 
    --bulma-primary-s: 85%;  
    --bulma-primary-l: 34%;  
    --bulma-primary: var(--primary-color);
    --bulma-primary-invert: var(--text-on-primary);
    
    --bulma-link: var(--primary-color);
    --bulma-link-hover: var(--primary-color-dark);
    --bulma-link-focus-border: var(--primary-color-light);

    --bulma-warning-h: 39; 
    --bulma-warning-s: 100%;
    --bulma-warning-l: 50%;
    --bulma-warning: var(--secondary-color);
    --bulma-warning-invert: var(--text-on-secondary);

    --bulma-text: var(--text-color);
    --bulma-text-strong: var(--primary-color-dark);
    --bulma-body-background-color: var(--background-color);
    --bulma-body-font-family: var(--body-font);
    --bulma-title-font-family: var(--heading-font);
    --bulma-subtitle-font-family: var(--body-font);
    --bulma-button-font-family: var(--body-font);
}

html {
    scroll-behavior: smooth;
    font-size: 100%; /* Corresponds to 16px by default */
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

.main-page-container {
    overflow: hidden; /* Helps contain parallax effects */
}

/* Typography */
h1, h2, h3, h4, h5, h6, .title, .subtitle {
    font-family: var(--heading-font);
    color: var(--text-color); /* Default dark text */
    font-weight: 700;
}
.title.is-1 { font-size: 3rem; margin-bottom: 1.5rem; }
.title.is-2 { font-size: 2.5rem; margin-bottom: 1.25rem; }
.title.is-3 { font-size: 2rem; margin-bottom: 1rem; }
.title.is-4 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.title.is-5 { font-size: 1.25rem; margin-bottom: 0.5rem; }

.subtitle {
    font-family: var(--body-font);
    color: var(--text-color-medium);
    font-weight: 400;
}

p {
    margin-bottom: 1rem;
    font-size: 1rem; /* Base paragraph size */
}

.content.is-medium p {
    font-size: 1.125rem; /* Larger text for readability in content blocks */
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    transition: color var(--transition-speed) var(--transition-easing);
}
a:hover {
    color: var(--primary-color-dark);
}

.section {
    padding: 4rem 1.5rem; /* Vertical rhythm */
}
.section-title {
    margin-bottom: 1rem !important; /* Override Bulma */
    color: var(--text-color) !important; /* Ensure high contrast for section titles */
    font-weight: 800 !important;
}
.section-subtitle {
    margin-bottom: 3rem !important;
    color: var(--text-color-medium) !important;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.has-background-light {
    background-color: var(--background-color-light) !important;
}

/* -----------------------------------------------------------------------------
   2. Header / Navbar
----------------------------------------------------------------------------- */
.header {
    background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
    backdrop-filter: blur(10px); /* Glassmorphism effect */
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color var(--transition-speed) var(--transition-easing);
}
.navbar-item img {
    max-height: 40px; /* Control logo height */
}
.navbar-item, .navbar-link {
    font-family: var(--body-font);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-color-medium);
    transition: color var(--transition-speed) var(--transition-easing);
}
.navbar-item:hover, .navbar-link:hover, .navbar-item.is-active {
    background-color: transparent !important;
    color: var(--primary-color) !important;
}
.navbar-burger {
    color: var(--text-color);
}
.navbar-menu {
    background-color: transparent; /* Inherit from .header for glassmorphism on mobile */
}
@media screen and (max-width: 1023px) {
    .navbar-menu {
        background-color: var(--background-color) !important; /* Solid on mobile dropdown */
        box-shadow: var(--shadow-medium);
    }
}

/* -----------------------------------------------------------------------------
   3. Hero Section
----------------------------------------------------------------------------- */
#hero {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    color: var(--text-color-light); /* All text in hero should be white */
}
.hero-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}
.hero .hero-body {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-color-light) !important; /* Ensure white color */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color-light) !important; /* Ensure white color */
    opacity: 0.9;
}
.hero-description {
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    color: var(--text-color-light) !important; /* Ensure white color */
    opacity: 0.95;
}

/* -----------------------------------------------------------------------------
   4. Buttons (Global)
----------------------------------------------------------------------------- */
.button {
    font-family: var(--body-font);
    font-weight: 700;
    border-radius: var(--border-radius-medium);
    padding: 0.75em 1.75em;
    transition: all var(--transition-speed) var(--transition-easing);
    box-shadow: var(--button-shadow);
    letter-spacing: 0.5px;
    text-transform: uppercase; /* Corporate style often uses uppercase for buttons */
    font-size: 0.9rem;
}
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.button.is-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-on-primary) !important;
}
.button.is-primary:hover {
    background-color: var(--primary-color-dark) !important;
    border-color: var(--primary-color-dark) !important;
}
.button.is-primary.is-outlined {
    background-color: transparent !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}
.button.is-primary.is-outlined:hover {
    background-color: var(--primary-color) !important;
    color: var(--text-on-primary) !important;
}
.button.is-large {
    font-size: 1.1rem;
    padding: 1em 2em;
}

/* Modern Button specific (if any deviation from .button) */
.modern-button {
    /* Extends .button, can add specific flair if needed */
    /* Example: Using accent color for specific modern buttons */
}
.modern-button.is-accent {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: var(--text-on-secondary) !important;
}
.modern-button.is-accent:hover {
    background-color: var(--secondary-color-dark) !important;
    border-color: var(--secondary-color-dark) !important;
}


/* -----------------------------------------------------------------------------
   5. Cards (General and Specific)
----------------------------------------------------------------------------- */
.card {
    background-color: var(--background-color);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
    transition: transform var(--transition-speed) var(--transition-easing), box-shadow var(--transition-speed) var(--transition-easing);
    height: 100%; /* Make cards in a row same height if Bulma columns are used */
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}
.card .card-image { /* This is the Bulma .card-image div */
    border-top-left-radius: var(--border-radius-large);
    border-top-right-radius: var(--border-radius-large);
    overflow: hidden; /* Ensures image respects border radius */
}
.card .card-image figure.image { /* Bulma figure element */
    margin: 0; /* Remove any default margins */
}
.card .card-image img {
    width: 100%;
    height: 100%; /* For aspect ratio boxes in Bulma */
    object-fit: cover; /* Crucial for consistent image display */
    display: block;
    border-top-left-radius: var(--border-radius-large); /* Apply if image is direct child, else to .card-image */
    border-top-right-radius: var(--border-radius-large);
}
.card .card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Allows content to take available space if card height is fixed by row */
}
.card .card-content .title {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}
.card .card-content .content p {
    color: var(--text-color-medium);
    font-size: 0.95rem;
    line-height: 1.5;
}
/* If global card content centering is required: */
/* .card .card-content { text-align: center; } */
/* .card .card-content .title, .card .card-content .content { text-align: center; } */


/* Specific Card Types */
.feature-card .card-image img,
.case-study-card .card-image img,
.project-card .card-image img {
    aspect-ratio: 16/9; /* Ensure aspect ratio if not using Bulma aspect classes */
}
.feature-card .card-content .title,
.case-study-card .card-content .title,
.project-card .card-content .title {
    font-size: 1.3rem; /* Slightly larger for main feature titles */
}

/* Testimonial Card */
.testimonial-card {
    background-color: var(--background-color-light); /* Or primary-color with light text */
}
.testimonial-card .card-content {
    text-align: left; /* Testimonials often look better left-aligned */
}
.testimonial-card .media-left img.is-rounded {
    border: 2px solid var(--secondary-color); /* Accent border for avatar */
}
.testimonial-card .media-content .title {
    color: var(--text-color);
}
.testimonial-card .media-content .subtitle {
    color: var(--text-color-muted);
}
.testimonial-card .content {
    font-style: italic;
    color: var(--text-color-medium);
    padding-top: 0.5rem;
    border-top: 1px solid #e0e0e0; /* Subtle separator */
    margin-top: 1rem;
}

/* -----------------------------------------------------------------------------
   6. Forms (Contact Section)
----------------------------------------------------------------------------- */
.modern-input, .modern-textarea {
    border-radius: var(--border-radius-medium) !important;
    border: 1px solid #dbdbdb !important;
    box-shadow: none !important; /* Remove Bulma's default focus shadow if desired */
    padding: 0.75em 1em !important;
    font-size: 1rem !important;
    transition: border-color var(--transition-speed) var(--transition-easing), box-shadow var(--transition-speed) var(--transition-easing) !important;
}
.modern-input:focus, .modern-textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.125em rgba(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l), 0.25) !important;
}
.modern-textarea {
    min-height: 120px;
}
.label {
    font-weight: 500;
    color: var(--text-color-medium);
    margin-bottom: 0.75rem; /* More space for labels */
}

/* -----------------------------------------------------------------------------
   7. Specific Sections Styling
----------------------------------------------------------------------------- */

/* About Section - Statistical Widgets */
.statistical-widgets .stat-widget {
    background-color: var(--background-color);
    border-radius: var(--border-radius-large);
    padding: 2rem 1rem;
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: transform var(--transition-speed) var(--transition-easing), box-shadow var(--transition-speed) var(--transition-easing);
}
.statistical-widgets .stat-widget:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}
.statistical-widgets .stat-widget .title.is-1 {
    color: var(--secondary-color) !important; /* Accent color for numbers */
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.statistical-widgets .stat-widget .subtitle.is-5 {
    color: var(--text-color-medium);
    font-weight: 500;
}

/* Partners Section */
.partner-logos .image img {
    max-height: 80px; /* Control partner logo size */
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter var(--transition-speed) var(--transition-easing), opacity var(--transition-speed) var(--transition-easing);
}
.partner-logos .column:hover .image img {
    filter: grayscale(0%);
    opacity: 1;
}
.partner-logos .has-text-weight-semibold {
    color: var(--text-color-medium);
    margin-top: 0.5rem;
}

/* External Resources Section */
.resource-list {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-soft);
}
.resource-list .media {
    align-items: flex-start;
}
.resource-list .media + .media {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee; /* Using custom class in HTML */
}
.resource-list .media .content strong a {
    color: var(--primary-color);
    font-size: 1.1rem;
}
.resource-list .media .content strong a:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}
.resource-list .media .content p {
    font-size: 0.9rem;
    color: var(--text-color-muted);
}
hr.resource-divider {
    background-color: #e0e0e0;
    height: 1px;
    margin: 1.5rem 0;
}


/* -----------------------------------------------------------------------------
   8. Footer
----------------------------------------------------------------------------- */
.footer {
    background-color: var(--background-color-dark);
    color: var(--text-color-light);
    padding: 4rem 1.5rem 2rem; /* More top padding */
}
.footer .title.has-text-white {
    color: var(--text-color-light) !important;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.footer-text, .footer .content p {
    color: #bdc3c7; /* Lighter grey for footer text */
    font-size: 0.95rem;
}
.footer-links li a {
    color: #bdc3c7 !important;
    padding: 0.3rem 0;
    display: inline-block;
}
.footer-links li a:hover {
    color: var(--secondary-color) !important; /* Accent color on hover */
    text-decoration: none;
}
.footer .social-media a {
    color: #bdc3c7 !important;
    font-size: 0.95rem;
    margin-inline-end: 1rem; /* RTL friendly margin */
    transition: color var(--transition-speed) var(--transition-easing);
}
.footer .social-media a:hover {
    color: var(--secondary-color) !important;
}
.footer hr {
    background-color: #4A4A4A; /* Darker hr for dark bg */
}
.footer #currentYear {
    /* JS will populate this */
}

/* -----------------------------------------------------------------------------
   9. Page-Specific Styles (success.html, privacy.html, terms.html)
----------------------------------------------------------------------------- */
/* Container for success page content */
.success-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    background-color: var(--background-color-light);
}
.success-page-container .icon {
    font-size: 4rem;
    color: var(--primary-color); /* Or a success green */
    margin-bottom: 1.5rem;
}
.success-page-container .title {
    color: var(--primary-color);
}
.success-page-container .button {
    margin-top: 1.5rem;
}

/* Container for content pages like privacy, terms */
.content-page {
    padding-top: calc(var(--navbar-height) + 2rem); /* Navbar height + extra space */
    padding-bottom: 4rem;
}
.content-page .container .content {
    max-width: 800px; /* Readable line length */
    margin: 0 auto;
}
.content-page .container .content h1, 
.content-page .container .content h2,
.content-page .container .content h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* -----------------------------------------------------------------------------
   10. Animations & Effects (Initial states for GSAP)
----------------------------------------------------------------------------- */
.animated-text, .animated-button {
    opacity: 0;
    transform: translateY(30px);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: opacity 0.6s var(--transition-easing), transform 0.6s var(--transition-easing);
}
.animate-on-scroll.is-visible { /* Class added by JS when element is in viewport */
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Parallax background effect (to be controlled by JS - GSAP) */
.parallax-background {
    background-attachment: fixed; /* Simple CSS parallax, JS can enhance */
    /* GSAP will manipulate background-position-y */
}
#hero { /* Already has background-image in HTML, enable JS parallax */
    /* Add specific class if needed or target #hero directly in JS */
}

/* "Read More" link styling */
.read-more-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 700;
    color: var(--secondary-color); /* Use accent color for "Read More" */
    text-decoration: none;
    position: relative;
    padding-right: 20px; /* Space for an arrow */
}
.read-more-link::after {
    content: '←'; /* RTL arrow */
    font-family: sans-serif; /* Ensure arrow displays correctly */
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: right var(--transition-speed) var(--transition-easing);
}
.read-more-link:hover::after {
    right: -5px; /* Move arrow on hover */
}
.read-more-link:hover {
    color: var(--secondary-color-dark);
}

/* -----------------------------------------------------------------------------
   11. Responsiveness (Bulma handles a lot, add overrides if needed)
----------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.25rem;
    }
    .hero-description {
        font-size: 1rem;
    }
    .section {
        padding: 3rem 1rem;
    }
    .title.is-1 { font-size: 2.2rem; }
    .title.is-2 { font-size: 1.8rem; }

    .columns.is-two-thirds { /* This selector is incorrect in logic, but if you mean a column that IS is-two-thirds */
        /* Forcing single column layout on mobile if Bulma's defaults aren't enough */
    }
    /* Asymmetric balance might need adjustments on mobile */
    .columns.is-vcentered .column:last-child {
        margin-top: 2rem; /* Add space between text and image if stacked */
    }
}

/* Ensure all images are responsive by default if not handled by Bulma's .image class */
img {
    max-width: 100%;
    height: auto;
    display: block; /* Removes bottom space under images */
}
/* For images inside Bulma's aspect ratio containers: */
.image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Re-iterate for safety */
}

/* Fix for columns with is-two-thirds to ensure they distribute correctly */
.column.is-two-thirds {
    /* Bulma should handle this, but if custom adjustments are needed for specific layouts */
    /* Example: ensure it doesn't shrink too much if its content is small */
}

/* High contrast for section titles (already handled in .section-title) */
.section-title {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Subtle shadow for depth if needed */
}

/* Ensure content centering in cards - this is a broad rule based on prompt */
/* This will center text. Image blocks are usually full width. */
/* If specific cards need this: */
/* .case-study-card .card-content, .project-card .card-content { text-align: center; } */
/* .case-study-card .card-content .title, .project-card .card-content .title { text-align: center; } */

/* Override Bulma's text color for general text if needed for higher contrast */
body, .content p, .content li {
    color: var(--text-color); /* Ensures base text is dark enough */
}

*{
    opacity: 1 !important;
}