:root {
    --primary-color: #0055aa; /* md_theme_light_primary */
    --on-primary-color: #ffffff; /* md_theme_light_onPrimary */
    --background-color: #edefff; /* md_theme_light_background */
    --surface-color: #fdfcff; /* md_theme_light_surface */
    --on-surface-color: #1a1c1e; /* md_theme_light_onBackground */
    --text-color: #1a1c1e; /* md_theme_light_onBackground */
    --text-light-color: #535f70; /* md_theme_light_secondary */
    --font-family: "Quicksand", sans-serif;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
    background-image: url("./img/bg_opt.webp");
    background-size: cover; /* Cover the entire area */
    background-position: center; /* Center the background image */
    background-repeat: no-repeat; /* Do not repeat the image */
    background-attachment: fixed; /* Keep the background fixed during scroll */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navbar --- */
.navbar {
    background-color: var(--surface-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    display: flex; /* Enable flexbox for icon and text alignment */
    align-items: center; /* Vertically align items */
    gap: 8px; /* Space between icon and text */

    /* Gradient Text for PROMA */
    background: linear-gradient(
        45deg,
        #0000a5,
        /* Color from icon.svg */ #006fff /* Color from icon.svg */
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback for non-webkit browsers */
}

.navbar-logo-icon {
    height: 1.8rem; /* Adjust size as needed */
    width: 1.8rem; /* Adjust size as needed */
    filter: drop-shadow(
        0 1px 1px rgba(0, 0, 0, 0.2)
    ); /* Optional: Add a subtle shadow to the icon */
}

.navbar nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navbar nav ul li {
    margin-left: 2rem;
}

.navbar nav ul li a {
    text-decoration: none;
    color: var(--text-light-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar nav ul li a:hover {
    color: var(--primary-color);
}

.navbar nav ul li a.active {
    color: var(--primary-color);
    padding-bottom: 5px; /* To slightly separate text from the border */
}

.navbar nav ul li a.active span {
    border-bottom: 2px solid var(--primary-color);
}

/* --- Responsive Navbar (Mobile) --- */
@media (max-width: 799px) {
    .navbar .container {
        justify-content: space-between;
    }

    #hamburger-menu-toggle {
        display: flex; /* Show hamburger menu toggle on small screens */
        align-self: center; /* Align with logo */
    }

    #navbar-nav-links {
        /* The <nav> element */
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 70%; /* Adjust width as needed */
        max-width: 300px; /* Limit max width for larger tablets in portrait */
        height: 100vh;
        background-color: var(--surface-color);
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        padding-top: 5rem; /* Space for the fixed header */
        z-index: 999; /* Below toggle button, above main content */
        display: flex; /* Use flexbox for vertical alignment */
        flex-direction: column;
        align-items: center; /* Center menu items */
        justify-content: flex-start; /* Start items from the top */
    }

    #navbar-nav-links.active {
        right: 0; /* Slide in */
    }

    #navbar-nav-links ul.navbar-nav {
        flex-direction: column; /* Stack items vertically */
        width: 100%;
        text-align: left;
        margin-top: 2rem; /* Add some space from the top padding */
    }

    #navbar-nav-links ul.navbar-nav li {
        margin: 1rem 0; /* Adjust vertical spacing */
    }

    #navbar-nav-links ul.navbar-nav li a {
        padding: 0.8rem 1rem; /* Add padding for clickable area */
        display: block; /* Make the whole area clickable */
        width: 100%; /* Ensure link takes full width */
        color: var(--text-color); /* Adjust text color for mobile menu */
    }

    #navbar-nav-links ul.navbar-nav li a:hover {
        background-color: var(
            --background-color
        ); /* Highlight on hover in mobile */
    }

    /* Hide the 'Get Started' button (with .nav-button-link) in the navbar on small screens */
    #navbar-nav-links ul.navbar-nav li .nav-button-link {
        display: none;
    }
}

/* --- Responsive Navbar (Desktop) --- */
@media (min-width: 800px) {
    #hamburger-menu-toggle {
        display: none; /* Hide hamburger menu toggle on large screens */
    }

    #navbar-nav-links {
        /* The <nav> element */
        position: static; /* Reset position for desktop */
        background-color: transparent; /* Reset background */
        box-shadow: none; /* Remove shadow */
        width: auto;
        height: auto;
        padding-top: 0;
        z-index: auto;
        display: block; /* Ensure nav is visible */
    }

    #navbar-nav-links ul.navbar-nav {
        display: flex; /* Ensure it's flex for desktop */
        flex-direction: row; /* Ensure links are horizontal */
        align-items: center; /* Vertically align items */
        margin-top: 0;
    }

    #navbar-nav-links ul.navbar-nav li {
        margin-left: 2rem; /* Restore desktop spacing */
        margin-right: 0; /* Ensure no right margin */
    }

    #navbar-nav-links ul.navbar-nav li a {
        padding: 0; /* Remove padding */
        display: inline-block; /* Reset to inline-block for desktop */
        width: auto; /* Reset width */
        color: var(--text-light-color); /* Restore desktop link color */
    }

    /* Show the 'Get Started' button (with .nav-button-link) in the navbar on large screens */
    #navbar-nav-links ul.navbar-nav li .nav-button-link {
        display: inline-block; /* Make button visible */
        margin-left: 2rem; /* Ensure spacing from other links */
    }
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none; /* Hidden by default on large screens */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001; /* Ensure it's above other content */
    padding: 5px;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animation for when the menu is active */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Hide the button in the navbar on small screens by default */

/* --- Buttons --- */
.button {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.button:hover {
    background-color: #003d78; /* Darker shade of primary-color */
    color: var(--on-primary-color);
    border-color: #003d78;
}

.button-primary {
    background-color: var(--primary-color);
    color: var(--on-primary-color);
}

/* --- Hero Section --- */
.hero-section {
    background-color: transparent; /* Make transparent to show page background */
    text-align: center;
    padding: 140px 0 120px 0;
    margin-top: 60px;
}

.hero-section h1 {
    font-size: clamp(1rem, 7vw, 3.2rem); /* Responsive font size */
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 700;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-light-color);
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
}

/* --- General Section Styling --- */
main section {
    padding: 80px 0;
}

/* Make the features section transparent */
.features-section {
    background-color: rgba(
        253,
        252,
        255,
        0.8
    ); /* Added 60% transparency to the features section */
    backdrop-filter: blur(10px);
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

/* --- Features Section --- */
.features-grid,
.for-whom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card,
.for-whom-card {
    background-color: var(--surface-color);
    padding: 2.5rem 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;

    /* Base for small screens: Column layout for 'for-whom-card' to allow image reordering */
    display: flex;
    flex-direction: column;
}

.feature-card:hover,
.for-whom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    margin-bottom: 1rem;
}

.feature-card h3,
.for-whom-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Style for the new div wrapping h3 and p */
.card-content {
    display: flex;
    flex-direction: column;
    /* This ensures that h3 and p inside card-content are always in a column */
    text-align: inherit; /* Inherit text alignment from parent card */
}

/* --- Unified Call to Action Section --- */
#unified-cta {
    background-color: var(--primary-color);
    color: var(--on-primary-color);
}

.cta-section {
    padding: 100px 0;
    text-align: center;
    width: 100%;
}

.cta-section h2 {
    color: var(--on-primary-color);
    font-size: 2.8rem;
    margin: 0 auto 1.5rem auto;
    text-align: center;
}

.cta-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    color: var(--on-primary-color);
    opacity: 0.9;
    text-align: center;
}

.cta-section .button {
    background-color: var(--on-primary-color);
    color: var(--primary-color);
    border-color: var(--on-primary-color);
    padding: 1rem 2.5rem;
    display: inline-block;
    margin: 0 auto;
    font-size: 1.2rem;
    border-radius: 50px;
}

.cta-section .button:hover {
    background-color: #e2e2e6;
    border-color: #e2e2e6;
    color: var(--primary-color);
}

/* --- Contact Section --- */
.contact-section {
    background-color: transparent; /* Make transparent to show page background */
}

#contact-form {
    max-width: 600px;
    margin: 2rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    width: 100%;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: var(--font-family);
    font-size: 1rem;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

#contact-form button {
    align-self: center;
    cursor: pointer;
    width: auto;
}

#form-status {
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
}

/* --- Footer --- */
.footer {
    background-color: #333;
    color: #fff;
    padding: 2rem 0;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 1rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.highlight-text {
    display: inline-block; /* Allows each line to be treated as a block for centering */
    color: var(--primary-color); /* Using the primary color for prominence */
    font-weight: 800; /* Making it extra bold */
    font-size: 1.2em; /* Slightly increasing the font size relative to its parent */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Adding a subtle text shadow */
}

.line-break-text {
    display: block; /* Forces this span to start on a new line */
}

.first-line-heading {
    color: var(--primary-color); /* Same color as the highlighted text */
    font-size: 0.8em; /* Make it a bit smaller than the highlighted text */
}

/* --- Responsive Adjustments for Cards --- */

/* New styles for feature card images */
.card-feature-image {
    width: 100%; /* Occupy full width of the card */
    height: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensures the image fits without cropping */
    margin-bottom: 1rem;
    border-radius: 8px; /* Slightly rounded corners for the image */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    display: block;
}

/* New styles for 'who is for' card images */
.card-who-image {
    width: 100%; /* Occupy full width of the card */
    height: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensures the image fits without cropping */
    border-radius: 8px; /* Slightly rounded corners for the image */
    margin-top: 0; /* Adjust margin for top placement */
    margin-bottom: 1rem; /* Space below the image */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    order: -1; /* Move image to the top visually */
}

/* Medium Screens: 400px to 900px */
@media (min-width: 400px) and (max-width: 900px) {
    .features-grid,
    .for-whom-grid {
        grid-template-columns: 1fr; /* Stack cards in a single column */
    }

    .feature-card,
    .for-whom-card {
        display: flex;
        flex-direction: row; /* Image on left, text on right */
        text-align: left;
        align-items: start; /* Vertically align content */
        padding: 1.5rem 2rem; /* Adjust padding */
    }

    .feature-icon {
        flex-shrink: 0; /* Prevent icon from shrinking */
        margin-right: 1.5rem;
        margin-bottom: 0; /* Remove bottom margin for horizontal layout */
    }

    .card-feature-image {
        width: 8rem; /* Smaller fixed width */
        height: 8rem; /* Fixed height for consistent look */
        margin-bottom: 0; /* Remove bottom margin */
    }

    .card-who-image {
        width: 8rem; /* Fixed width for 'who is for' image */
        height: 8rem; /* Fixed height */
        margin-right: 1.5rem;
        margin-bottom: 0; /* Remove bottom margin */
        order: 0; /* Reset order for horizontal layout */
        flex-shrink: 0; /* Prevent image from shrinking */
    }

    .feature-card h3,
    .for-whom-card h3 {
        margin-top: 0;
    }

    .card-content {
        flex-grow: 1; /* Allow content to take available space */
    }
}

/* Large Screens: > 900px */
@media (min-width: 900px) {
    .features-grid,
    .for-whom-grid {
        grid-template-columns: repeat(3, 1fr); /* Three columns */
    }

    .feature-card,
    .for-whom-card {
        display: flex; /* Keep flex for order property to work for .for-whom-card */
        flex-direction: column; /* Image on top, text below */
        text-align: center;
        padding: 2.5rem 2rem; /* Restore original padding */
    }

    .feature-icon {
        margin-right: 0; /* Reset margin */
        margin-bottom: 1rem; /* Restore bottom margin */
    }

    .card-feature-image {
        object-fit: cover; /* Cover the area, cropping if necessary */
        margin-top: 0;
        margin-bottom: 1rem;
        order: -1; /* Keep image at the top visually */
    }

    .card-who-image {
        object-fit: cover; /* Cover the area, cropping if necessary */
        margin-top: 0;
        margin-bottom: 1rem;
        order: -1; /* Keep image at the top visually */
    }
}
