/* style.css */

/*--------------------------------------------------------------
# CSS Variables
--------------------------------------------------------------*/
:root {
    --font-primary: 'Oswald', 'Tajawal', sans-serif;
    --font-secondary: 'Cairo', 'Nunito', sans-serif;

    /* Triadic Color Scheme */
    --color-primary: #0D47A1; /* Deep Blue */
    --color-primary-dark: #09316E;
    --color-primary-light: #1E88E5; 
    --color-primary-rgb: 13, 71, 161; /* For box-shadow alpha */

    --color-secondary: #D1A10D; /* Gold */
    --color-secondary-dark: #B3890B;
    --color-secondary-light: #FFCA28;

    --color-accent: #A10D47; /* Magenta/Rose */
    --color-accent-dark: #7C0A37;
    --color-accent-light: #D81B60;

    --color-text-light: #FFFFFF;
    --color-text-dark: #333333;
    --color-text-headings: #222222;
    --color-text-muted: #555555; /* Darker muted text for better contrast on light bg */

    --color-background-body: #F4F7F6; 
    --color-background-light-section: #FFFFFF;
    --color-background-card: #FFFFFF;
    --color-background-footer: #333333;
    
    --color-border: #d1d1d1; /* Slightly darker border for better visibility */

    /* Biomorphic Design Elements */
    --border-radius-soft: 15px 5px 15px 5px;
    --border-radius-sharp: 8px 2px 8px 2px;
    --border-radius-button: 20px 5px 20px 5px;
    --border-radius-rounded: 50px;

    /* Shadows */
    --box-shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
    --box-shadow-medium: 0 6px 16px rgba(0, 0, 0, 0.1);
    --box-shadow-interactive: 0 5px 15px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition-speed: 0.3s;
    --transition-easing: ease-in-out;

    /* Spacing */
    --spacing-unit: 1rem; 
}

/*--------------------------------------------------------------
# Global Styles
--------------------------------------------------------------*/
html {
    scroll-behavior: smooth;
    font-size: 100%; 
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-background-body);
    color: var(--color-text-dark);
    line-height: 1.7;
    font-size: 1rem;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--color-text-headings);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem; 
    line-height: 1.3;
}

/* Bulma Overrides for Font and Color Consistency */
.title { 
    font-family: var(--font-primary) !important;
    color: var(--color-text-headings) !important;
    font-weight: 700 !important;
}
.subtitle { 
    font-family: var(--font-secondary) !important;
    color: var(--color-text-muted) !important; 
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-easing);
}

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

p {
    margin-bottom: var(--spacing-unit);
}

img {
    max-width: 100%;
    height: auto; 
    display: block; 
}

.section {
    padding: 4rem 1.5rem; 
}

.section-title {
    font-size: 2.5rem; 
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem; 
    color: var(--color-text-headings);
}
@media screen and (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .section {
        padding: 3rem 1rem;
    }
}

.has-text-shadow {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/*--------------------------------------------------------------
# Header / Navbar
--------------------------------------------------------------*/
.navbar {
    background-color: var(--color-background-card); 
    box-shadow: var(--box-shadow-soft);
    position: sticky; 
    top: 0;
    z-index: 1020; /* Higher than Bulma modal (1000) */
    transition: background-color var(--transition-speed) var(--transition-easing), box-shadow var(--transition-speed) var(--transition-easing);
}

.navbar.is-transparent { 
   background-color: transparent !important; 
   box-shadow: none;
}

.navbar.is-scrolled { /* Add this class with JS on scroll */
    background-color: var(--color-background-card) !important;
    box-shadow: var(--box-shadow-medium);
}

.navbar-brand .title {
    color: var(--color-primary) !important;
}
.navbar-brand .navbar-item:hover {
    background-color: transparent !important;
}

.navbar-item, .navbar-link {
    font-family: var(--font-secondary);
    font-weight: 600;
    color: var(--color-text-dark);
    transition: color var(--transition-speed) var(--transition-easing);
}
.navbar-item:hover, .navbar-link:hover,
.navbar-item.is-active, .navbar-link.is-active {
    background-color: transparent !important; 
    color: var(--color-primary) !important;
}

.navbar-burger span {
    background-color: var(--color-primary); 
    height: 2px; /* Slimmer burger lines */
}
.navbar-burger span:nth-child(1) { top: calc(50% - 6px); }
.navbar-burger span:nth-child(2) { top: calc(50% - 1px); }
.navbar-burger span:nth-child(3) { top: calc(50% + 4px); }

@media screen and (max-width: 1023px) {
    .navbar-menu {
        background-color: var(--color-background-card);
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        padding: 0.5rem 0;
        border-bottom-left-radius: var(--border-radius-sharp);
        border-bottom-right-radius: var(--border-radius-sharp);
    }
    .navbar-item {
        padding: 0.75rem 1.5rem; /* More padding for touch */
    }
}

/*--------------------------------------------------------------
# Buttons (Global)
--------------------------------------------------------------*/
.button, button, input[type="submit"], input[type="button"], input[type="reset"] {
    font-family: var(--font-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius-button);
    padding: 0.8em 1.8em; /* Adjusted padding */
    transition: all var(--transition-speed) var(--transition-easing);
    border: 2px solid transparent;
    cursor: pointer;
    line-height: 1.5; 
    box-shadow: var(--box-shadow-soft); /* Subtle shadow by default */
}

.button:hover, button:hover, input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-interactive);
}
.button:active, button:active, input[type="submit"]:active {
    transform: translateY(-1px);
    box-shadow: var(--box-shadow-soft); /* Less shadow on active */
}

.button.is-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-light);
}
.button.is-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.button.is-secondary {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-text-light);
}
.button.is-secondary:hover {
    background-color: var(--color-secondary-dark);
    border-color: var(--color-secondary-dark);
}

.button.is-accent {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-light);
}
.button.is-accent:hover {
    background-color: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
#hero.hero { 
    position: relative;
    color: var(--color-text-light); 
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0; 
}

#hero .hero-body {
    position: relative; 
    z-index: 1; 
    /* Overlay from inline style: background-color: rgba(0,0,0,0.5) */
}

#hero .hero-title {
    color: var(--color-text-light) !important; 
    font-size: 3.5rem; 
    margin-bottom: 1rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
}

#hero .hero-subtitle {
    color: var(--color-text-light) !important; 
    font-size: 1.75rem; 
    margin-bottom: 2.5rem;
    font-weight: 400; /* Subtitles are often lighter */
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}
#hero .button {
    padding: 1em 2.5em; /* Larger hero button */
    font-size: 1.1rem;
}

@media screen and (max-width: 768px) {
    #hero .hero-title {
        font-size: 2.5rem;
    }
    #hero .hero-subtitle {
        font-size: 1.25rem;
    }
    #hero .button {
        font-size: 1rem;
        padding: 0.8em 2em;
    }
}

/*--------------------------------------------------------------
# Card Styles
--------------------------------------------------------------*/
.card {
    background-color: var(--color-background-card);
    border-radius: var(--border-radius-soft);
    box-shadow: var(--box-shadow-soft);
    transition: transform var(--transition-speed) var(--transition-easing), box-shadow var(--transition-speed) var(--transition-easing);
    overflow: hidden; 
    height: 100%; 
    display: flex; 
    flex-direction: column;
    /* align-items: center; -- Only if all card content is to be centered */
}

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

/* Card image handling */
.card .card-image { /* Bulma's .card-image div */
    width: 100%; 
    overflow: hidden; /* Ensure img border-radius is respected */
}
.card .card-image .image-container { /* The custom div in HTML, often wraps figure */
    /* If this container is meant to constrain the figure.image */
    /* For example: to add padding around the figure.image */
}
.card .card-image figure.image { /* Bulma's figure.image */
    margin: 0; /* Remove any default figure margin */
}
.card .card-image img { 
    object-fit: cover;
    width: 100%;
    height: 100%; /* For aspect ratio figures (like .is-4by3), img is absolute and covers */
    border-top-left-radius: var(--border-radius-soft); /* Round top-left of image */
    border-top-right-radius: 5px; /* Round top-right of image (as per soft radius) */
    /* If no figure.image and img is direct child of .card-image or .image-container */
}
.card .card-image:not(:has(figure.image)) img,
.card .image-container:not(:has(figure.image)) img {
    height: 220px; /* Fixed height for images not in aspect ratio containers */
    object-fit: cover;
}


.card .card-content {
    padding: 1.5rem;
    text-align: center; 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
}

.card .card-content .title,
.card .card-content .subtitle {
    margin-bottom: 0.75rem;
}
.card .card-content .title.is-4 { font-size: 1.5rem; }
.card .card-content .title.is-5 { font-size: 1.25rem; }

.card .card-content .content {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem; 
    flex-grow: 1; /* Allows content to take available space */
}
.card .card-content .button {
    margin-top: auto; /* Pushes button to bottom if card-content is flex column */
}

/*--------------------------------------------------------------
# Methodology Section
--------------------------------------------------------------*/
#methodology .progress-indicator {
    background-color: #e9ecef; /* Lighter gray */
    border-radius: var(--border-radius-rounded); 
    overflow: hidden;
    height: 22px; 
    margin-bottom: 1rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#methodology .progress-indicator .progress-bar {
    background-color: var(--color-primary);
    height: 100%;
    text-align: center;
    color: var(--color-text-light);
    line-height: 22px;
    font-size: 0.75rem; /* Smaller text for progress */
    font-weight: 600; /* Semibold */
    font-family: var(--font-secondary); /* Use body font for readability */
    border-radius: var(--border-radius-rounded); /* Rounded on both ends (mask parent) */
    transition: width 0.8s var(--transition-easing); /* Slower transition */
}

/*--------------------------------------------------------------
# Statistics Section & Parallax
--------------------------------------------------------------*/
.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 6rem 1.5rem;
    position: relative;
    color: var(--color-text-light); 
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%); /* Gradient overlay */
    z-index: 0;
}

.parallax-section .container {
    position: relative;
    z-index: 1;
}

.parallax-section .title,
.parallax-section .subtitle,
.parallax-section p { 
    color: var(--color-text-light) !important;
}
.parallax-section .title {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

#statistics .stat-widget {
    background-color: rgba(255, 255, 255, 0.05); /* More subtle glass */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 2rem 1.5rem; /* More padding */
    border-radius: var(--border-radius-soft);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Softer shadow */
    text-align: center;
    color: var(--color-text-light); 
    height: 100%; /* For equal height widgets */
}

#statistics .stat-widget .stat-number {
    font-size: 3.5rem; 
    font-weight: 700;
    color: var(--color-secondary-light); /* Brighter gold */
    font-family: var(--font-primary);
    display: block;
    margin-bottom: 0.5rem;
}

#statistics .stat-widget .stat-label {
    font-size: 1rem;
    color: rgba(255,255,255,0.85); 
    line-height: 1.4;
}

/*--------------------------------------------------------------
# Form Elements
--------------------------------------------------------------*/
.label {
    color: var(--color-text-headings);
    font-weight: 600; /* Bolder labels */
    font-family: var(--font-secondary);
}
.input, .textarea {
    font-family: var(--font-secondary);
    border-radius: var(--border-radius-sharp);
    border: 1px solid var(--color-border);
    box-shadow: none; 
    padding: 0.75em 1em; /* Standard padding */
    transition: border-color var(--transition-speed) var(--transition-easing), box-shadow var(--transition-speed) var(--transition-easing);
}
.input:hover, .textarea:hover {
    border-color: var(--color-primary-light);
}
.input:focus, .textarea:focus,
.input.is-focused, .textarea.is-focused,
.input:active, .textarea:active,
.input.is-active, .textarea.is-active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.125em rgba(var(--color-primary-rgb), 0.25); 
}

/*--------------------------------------------------------------
# External Links Section
--------------------------------------------------------------*/
.external-links-section {
    background-color: #e8f0fe; 
    padding: 3rem 1.5rem;
    border-radius: 20px; 
}

.external-links-section .link-item {
    display: block;
    padding: 0.85rem 1.25rem; 
    margin-bottom: 0.75rem;
    background-color: var(--color-background-card);
    border-radius: var(--border-radius-sharp); 
    color: var(--color-primary);
    font-weight: bold;
    transition: background-color var(--transition-speed) var(--transition-easing), color var(--transition-speed) var(--transition-easing), transform var(--transition-speed) var(--transition-easing), box-shadow var(--transition-speed) var(--transition-easing);
    border: 1px solid var(--color-border);
    box-shadow: var(--box-shadow-soft);
}

.external-links-section .link-item:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-color: var(--color-primary);
    transform: translateX(5px) scale(1.02); 
    box-shadow: var(--box-shadow-interactive);
}

/*--------------------------------------------------------------
# Awards/Testimonials Section
--------------------------------------------------------------*/
#awards .card .media {
    align-items: center; /* Vertically align avatar and text */
}
#awards .card .media-left img {
    border-radius: 50%; 
    width: 60px; /* Larger avatar */
    height: 60px;
    object-fit: cover;
    border: 2px solid var(--color-secondary); /* Avatar border */
}
#awards .card .media-content .title { margin-bottom: 0.25rem; }
#awards .card .media-content .subtitle { color: var(--color-text-muted); }

#awards .card .content { 
    font-style: italic;
    color: var(--color-text-muted);
    border-left: 4px solid var(--color-secondary); 
    padding-left: 1.25rem;
    margin-top: 1rem;
    font-size: 1rem; /* Larger testimonial text */
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
    background-color: var(--color-background-footer);
    color: rgba(255,255,255,0.7); /* Softer white for general text */
    padding: 4rem 1.5rem 2rem; 
}

.footer .title.is-5 { 
    color: var(--color-text-light) !important; 
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1.1rem; /* Slightly smaller footer titles */
}

.footer a {
    color: var(--color-secondary);
    transition: color var(--transition-speed) var(--transition-easing);
    font-weight: 500; /* Semibold footer links */
}

.footer a:hover {
    color: var(--color-secondary-light); 
    text-decoration: none; /* No underline on hover for cleaner look */
}

.footer .content p { /* For copyright and general text */
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}
.footer .column p { /* For lists of links */
    margin-bottom: 0.6rem;
}

.footer hr {
    background-color: rgba(255,255,255,0.2); /* Lighter hr */
    height: 1px;
    margin: 2rem 0;
}

/*--------------------------------------------------------------
# Specific Page Styles (requires body classes)
--------------------------------------------------------------*/
body.page-privacy main,
body.page-terms main {
    padding-top: calc(4rem + 52px); /* 4rem section padding + navbar height (approx 52px from Bulma) */
    padding-bottom: 4rem;
    background-color: var(--color-background-light-section); /* Ensure content area has a bg */
}
body.page-privacy .section,
body.page-terms .section {
    padding-top: 0; /* Remove section top padding as main has it */
}

/* Success Page */
body.page-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    color: var(--color-text-light);
}

.page-success .success-container {
    background-color: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: var(--border-radius-soft);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); /* Glassmorphism shadow */
    border: 1px solid rgba(255, 255, 255, 0.18);
    max-width: 600px;
    width: 90%;
}

.page-success .success-icon { 
    font-size: 5rem;
    color: var(--color-secondary-light);
    margin-bottom: 1.5rem;
    /* Example: Use a checkmark icon if available via JS or font */
}
.page-success .success-icon::before {
    content: '✓'; /* Simple checkmark */
    font-weight: bold;
}

.page-success h1 {
    color: var(--color-text-light) !important;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.page-success p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
}
.page-success .button {
    font-size: 1.1rem;
}

/*--------------------------------------------------------------
# Utility Classes & Small Elements
--------------------------------------------------------------*/
.text-justify {
    text-align: justify;
}

.list { /* For ul.list */
    list-style: none;
    padding-left: 0;
}
.list .list-item { 
    padding-left: 1.75em;
    position: relative;
    margin-bottom: 0.6em;
    font-size: 1rem;
}
.list .list-item::before {
    content: "✓"; 
    color: var(--color-primary);
    position: absolute;
    left: 0;
    top: 2px; /* Adjust vertical alignment */
    font-weight: bold;
    font-size: 1.1em;
}

.read-more-link {
    display: inline-block;
    font-weight: 700; /* Bold for emphasis */
    color: var(--color-primary);
    text-decoration: none;
    position: relative;
    padding-right: 28px; 
    transition: color var(--transition-speed) var(--transition-easing), padding-right var(--transition-speed) var(--transition-easing);
}
.read-more-link::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform var(--transition-speed) var(--transition-easing), right var(--transition-speed) var(--transition-easing);
    font-weight: bold; 
    font-size: 1.2em; /* Slightly larger arrow */
}
.read-more-link:hover {
    color: var(--color-primary-dark);
    padding-right: 32px; /* Push text slightly left for arrow movement */
}
.read-more-link:hover::after {
    right: -5px; /* Move arrow more visibly */
}

/*--------------------------------------------------------------
# Scroll Animations (Setup for JS)
--------------------------------------------------------------*/
[data-sr] { /* Attribute used by ScrollReveal */
    visibility: hidden; /* Hide until revealed */
}

/* Ensure Bulma columns have consistent spacing */
.columns.is-multiline { /* Only if .is-multiline is used */
    /* Bulma handles gaps well, this is often not needed unless overriding */
}
.columns:not(.is-gapless) {
    /* Default Bulma behavior for gaps is usually fine */
}

/* Fix for image containers if they have fixed height in HTML but img inside is auto */
.card .image-container:has(> figure.image) {
    /* This specific structure is handled by Bulma's figure.image for aspect ratio */
}
.card .image-container:not(:has(> figure.image)) {
    /* If .image-container directly holds an <img> and needs a fixed height */
    /* height: 220px;  -- Example, if set, then img inside should be 100% height too */
    /* overflow: hidden; */
}