/* style.css */

/* CSS Variables */
:root {
    --primary-bg: #e0e5ec; /* Light neutral background */
    --primary-bg-darker: #c8cdd3; /* For dark shadow */
    --primary-bg-lighter: #f8f9fa; /* For light shadow */

    --text-color-dark: #343a40; /* Dark text for high contrast */
    --text-color-medium: #5a6268; /* Medium text */
    --text-color-light: #adb5bd; /* Light text for less emphasis */
    --text-color-on-dark: #f8f9fa; /* White/light text on dark backgrounds */

    --accent-color: #007bff; /* Bootstrap primary, can be adjusted */
    --accent-color-dark: #0056b3;
    --accent-color-light: #52a4ff;

    --white-color: #FFFFFF;
    --black-color: #000000;
    --neutral-grey: #f0f0f3; /* For cards and elements background */

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Source Sans Pro', sans-serif;

    --border-radius-sm: 8px;
    --border-radius-md: 15px;
    --border-radius-lg: 25px;

    --shadow-outset: 6px 6px 12px var(--primary-bg-darker), -6px -6px 12px var(--primary-bg-lighter);
    --shadow-inset: inset 6px 6px 12px var(--primary-bg-darker), inset -6px -6px 12px var(--primary-bg-lighter);
    --shadow-outset-sm: 4px 4px 8px var(--primary-bg-darker), -4px -4px 8px var(--primary-bg-lighter);
    --shadow-inset-sm: inset 4px 4px 8px var(--primary-bg-darker), inset -4px -4px 8px var(--primary-bg-lighter);

    --transition-speed: 0.3s ease-in-out;
    --header-height: 70px; /* Adjust as needed */
}

/* Base Styles */
body {
    font-family: var(--font-body);
    background-color: var(--primary-bg);
    color: var(--text-color-dark);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    color: var(--text-color-dark);
    margin-bottom: 0.75rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Subtle text shadow for headings */
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #222222; /* Ensure high contrast for section titles */
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}

p {
    margin-bottom: 1rem;
    color: var(--text-color-medium);
}

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

a:hover {
    color: var(--accent-color-dark);
    text-decoration: none;
}
.sticky-top{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

/* Main Container */
.main-container {
    width: 100%;
    overflow-x: hidden; /* Prevents horizontal scrollbars */
}

/* Utility Classes */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--transition-speed), transform 0.6s var(--transition-speed);
}

.scroll-animate.animated {
    opacity: 1;
    transform: translateY(0);
}

.list-styled {
    padding-left: 20px;
    list-style: none; /* Remove default bullets */
}
.list-styled li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 15px;
}
.list-styled li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}


/* Header & Navigation */
.site-header {
    background-color: var(--primary-bg);
    box-shadow: var(--shadow-outset-sm);
    z-index: 1030; /* Bootstrap's default for fixed navbar is 1030 */
    height: var(--header-height);
}

.neumorphic-nav {
    background-color: transparent !important; /* Override Bootstrap */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand {
    font-size: 1.75rem;
    color: var(--text-color-dark) !important;
    font-weight: 700;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-color-medium) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed), color var(--transition-speed);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color) !important;
    background-color: var(--primary-bg); /* Add subtle background on hover/active */
    box-shadow: var(--shadow-inset-sm);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    background-color: var(--primary-bg);
    box-shadow: var(--shadow-outset-sm);
    transition: box-shadow var(--transition-speed);
}

.navbar-toggler:focus {
    box-shadow: var(--shadow-inset-sm);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2852, 58, 64, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Global Button Styles */
.btn, button, input[type='submit'], input[type='button'] {
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    display: inline-flex; /* For aligning icon and text */
    align-items: center;
    justify-content: center;
    background-color: var(--primary-bg); /* Base for neumorphic */
    color: var(--accent-color);
    box-shadow: var(--shadow-outset);
}
.btn > span, button > span, input[type='submit'] > span, input[type='button'] > span {
    display: block;
    transition: transform 0.2s ease-out;
}
.btn:hover > span, button:hover > span, input[type='submit']:hover > span, input[type='button']:hover > span {
    transform: translateY(-1px);
}


/* Neumorphic Button Styles Specifics */
/* This is now merged into the global .btn styles for neumorphic-btn class */
.neumorphic-btn { /* This class is now used to ensure neumorphic styles if default .btn is overridden by Bootstrap too much */
    background-color: var(--primary-bg);
    color: var(--accent-color);
    box-shadow: var(--shadow-outset);
}

.btn:hover, button:hover, input[type='submit']:hover, input[type='button']:hover {
    background-color: var(--primary-bg);
    color: var(--accent-color-dark);
    box-shadow: var(--shadow-outset-sm); /* Slightly smaller shadow on hover */
}

.btn:active, .btn:focus,
button:active, button:focus,
input[type='submit']:active, input[type='submit']:focus,
input[type='button']:active, input[type='button']:focus {
    background-color: var(--primary-bg);
    color: var(--accent-color-dark);
    box-shadow: var(--shadow-inset) !important; /* Inset shadow on active/focus, important to override hover */
    outline: none; /* Remove default focus outline */
}

/* Primary buttons (e.g., .btn-primary from Bootstrap) */
.btn-primary, button.btn-primary { /* Assuming Bootstrap .btn-primary class is used */
    color: var(--white-color);
    background: var(--accent-color);
    box-shadow: 4px 4px 10px #0056b3b3, -4px -4px 10px #52a4ffb3; /* Softer shadow for colored buttons */
}
.btn-primary:hover, button.btn-primary:hover {
    background: var(--accent-color-dark);
    color: var(--white-color);
    box-shadow: 2px 2px 5px #0056b3b3, -2px -2px 5px #52a4ffb3;
}
.btn-primary:active, .btn-primary:focus,
button.btn-primary:active, button.btn-primary:focus {
    background: var(--accent-color-dark);
    color: var(--white-color);
    box-shadow: inset 4px 4px 8px #0056b3, inset -4px -4px 8px #52a4ff !important;
}


.neumorphic-btn-outline {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color) !important; /* Traditional outline */
    box-shadow: none !important; /* No neumorphic shadow for outline */
}

.neumorphic-btn-outline:hover {
    background-color: var(--accent-color) !important;
    color: var(--white-color) !important;
    border-color: var(--accent-color) !important;
}
.neumorphic-btn-outline:active,
.neumorphic-btn-outline:focus {
     background-color: var(--accent-color-dark) !important;
    color: var(--white-color) !important;
    border-color: var(--accent-color-dark) !important;
    box-shadow: none !important;
}

.neumorphic-link {
    color: var(--accent-color);
    font-weight: 600;
    transition: color var(--transition-speed), text-shadow var(--transition-speed);
}
.neumorphic-link:hover {
    color: var(--accent-color-dark);
    text-shadow: 0 0 5px var(--accent-color-light);
}

/* Hero Section */
.hero-section {
    min-height: calc(100vh - var(--header-height)); /* Ensure it takes viewport height minus header */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative; /* For parallax if JS adds layers */
    padding-top: var(--header-height); /* Offset for fixed header */
    display: flex; /* For vertical centering of content */
    align-items: center; /* For vertical centering of content */
    justify-content: center; /* For horizontal centering of content */
}

/* Ensure white text for Hero as requested */
.hero-section h1,
.hero-section p {
    color: var(--white-color) !important; /* Important to override other text colors */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); /* Stronger shadow for readability on any image */
}
.hero-section .lead {
    font-size: 1.25rem;
    font-weight: 400;
}
.hero-cta-btn {
    margin-top: 1.5rem;
}

/* General Section Styling */
.section-neumorphic,
.bg-light-neumorphic {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.bg-light-neumorphic {
    background-color: var(--neutral-grey); /* Slightly different from main bg for depth */
}


/* Neumorphic Cards */
.neumorphic-card {
    background-color: var(--neutral-grey);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-outset);
    padding: 1.5rem;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* height: 100%; For consistent card height in rows */
}

.neumorphic-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 16px var(--primary-bg-darker), -8px -8px 16px var(--primary-bg-lighter);
}

.neumorphic-card .card-title {
    color: var(--text-color-dark);
    margin-bottom: 0.75rem;
}

.neumorphic-card .card-text {
    color: var(--text-color-medium);
    font-size: 0.95rem;
    flex-grow: 1; /* Allows text to take available space pushing button down */
}

.neumorphic-card .card-image,
.neumorphic-card .image-container {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.neumorphic-card .card-image img,
.neumorphic-card .image-container img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    margin: 0 auto;
}

/* Fixed height for image containers in specific cards */
#blog .card .card-image,
#case-studies .card .card-image {
    height: 200px; /* Example fixed height */
    width: 100%; /* Ensure container takes full width of card column */
}
#blog .card .card-image img,
#case-studies .card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Icon cards in Media/Resources section */
.info-card .card-image {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.neumorphic-icon {
    box-shadow: var(--shadow-outset-sm);
    border-radius: 50%;
    padding: 10px;
    background-color: var(--neutral-grey);
}


/* Accordion */
.neumorphic-accordion .accordion-item {
    background-color: var(--neutral-grey);
    border: none;
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-outset);
    overflow: hidden;
}

.neumorphic-accordion .accordion-header {
    margin-bottom: 0;
}

.neumorphic-accordion-btn {
    background-color: var(--neutral-grey);
    color: var(--text-color-dark);
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    border: none;
    box-shadow: none;
    font-weight: 600;
    font-family: var(--font-body);
}
.neumorphic-accordion-btn:not(.collapsed) {
    background-color: var(--neutral-grey);
    color: var(--accent-color);
    box-shadow: var(--shadow-inset-sm);
}
.neumorphic-accordion-btn::after {
    filter: invert(40%) sepia(10%) saturate(2000%) hue-rotate(180deg) brightness(90%) contrast(90%);
}
.neumorphic-accordion-btn:not(.collapsed)::after {
    filter: invert(50%) sepia(80%) saturate(1500%) hue-rotate(190deg) brightness(100%) contrast(100%);
}

.neumorphic-accordion .accordion-body {
    padding: 1rem 1.5rem;
    background-color: var(--primary-bg);
    border-bottom-left-radius: var(--border-radius-md);
    border-bottom-right-radius: var(--border-radius-md);
}

/* Slider (Carousel) */
.neumorphic-slider .carousel-inner {
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-inset);
    background-color: var(--primary-bg);
    overflow: hidden;
}
.neumorphic-slider .carousel-item .card {
    box-shadow: none;
    margin-left: auto;
    margin-right: auto;
    background-color: transparent;
}

.neumorphic-carousel-control {
    width: 50px;
    height: 50px;
    background-color: var(--primary-bg) !important;
    border-radius: 50%;
    box-shadow: var(--shadow-outset-sm);
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}
.neumorphic-carousel-control:hover {
    box-shadow: var(--shadow-outset);
    opacity: 1;
}
.neumorphic-carousel-control:active {
    box-shadow: var(--shadow-inset-sm);
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(60%) sepia(10%) saturate(200%) hue-rotate(180deg);
}

.carousel-indicators [data-bs-target] {
    background-color: var(--text-color-medium) !important;
    border-radius: 50%;
    width: 12px !important;
    height: 12px !important;
    margin: 0 5px !important;
    box-shadow: var(--shadow-inset-sm);
    opacity: 0.7;
}
.carousel-indicators .active {
    background-color: var(--accent-color) !important;
    box-shadow: var(--shadow-outset-sm);
    opacity: 1;
}

/* Partners Slider (Logos) */
.neumorphic-slider-logos .carousel-inner {
    box-shadow: none;
    background-color: transparent;
}
.partner-logo {
    max-height: 60px;
    width: auto;
    filter: grayscale(80%) contrast(1.2);
    transition: filter var(--transition-speed), transform var(--transition-speed);
    margin: 0 auto;
}
.partner-logo:hover {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.05);
}


/* Forms (Contact Section, etc.) */
.neumorphic-form .form-label {
    font-weight: 600;
    color: var(--text-color-dark);
    margin-bottom: 0.5rem;
}

.neumorphic-input,
.neumorphic-textarea {
    background-color: var(--primary-bg);
    border: none;
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-inset);
    color: var(--text-color-dark);
    width: 100%;
    transition: box-shadow var(--transition-speed), background-color var(--transition-speed);
}

.neumorphic-input::placeholder,
.neumorphic-textarea::placeholder {
    color: var(--text-color-light);
}

.neumorphic-input:focus,
.neumorphic-textarea:focus {
    outline: none;
    box-shadow: var(--shadow-inset-sm), 0 0 0 0.2rem var(--accent-color-light);
    background-color: var(--white-color);
}

.neumorphic-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Switch */
.neumorphic-switch .form-check-input {
    width: 2.5em;
    height: 1.25em;
    background-color: var(--primary-bg-darker);
    border: none;
    border-radius: 1.25em;
    box-shadow: var(--shadow-inset-sm);
    transition: background-color var(--transition-speed), background-position var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    background-position: left center;
    background-repeat: no-repeat;
}
.neumorphic-switch .form-check-input:checked {
    background-color: var(--accent-color);
    box-shadow: var(--shadow-outset-sm);
    background-position: right center;
}
.neumorphic-switch .form-check-input:focus {
    box-shadow: var(--shadow-inset-sm), 0 0 0 0.2rem var(--accent-color-light);
}
.neumorphic-switch .form-check-label {
    padding-left: 0.5em;
    color: var(--text-color-medium);
}

/* External Resources Section Specifics */
.resource-title {
    font-size: 1.1rem;
    min-height: 3.3em; /* Ensure roughly 3 lines for title consistency */
}
.resource-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color-medium);
}

/* Footer */
.site-footer {
    background-color: #2c3238; /* Darker, slightly different neutral for footer */
    color: var(--text-color-on-dark);
    padding-top: 3rem;
    padding-bottom: 2rem;
}
.section-neumorphic-dark { /* Used for footer directly in HTML */
     background-color: #2c3238;
    color: var(--text-color-on-dark);
}
.site-footer h5 {
    color: var(--white-color);
    margin-bottom: 1rem;
}
.site-footer p {
    color: var(--text-color-light);
    font-size: 0.9rem;
}
.footer-link {
    color: var(--text-color-light) !important;
    display: inline-block;
    padding: 0.25rem 0;
    transition: color var(--transition-speed), transform var(--transition-speed);
}
.footer-link:hover {
    color: var(--accent-color-light) !important;
    transform: translateX(3px);
}
.site-footer hr {
    border-color: rgba(255, 255, 255, 0.15);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}
.site-footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

/* Special Page Styles */

/* success.html */
/* Add class="success-page" to body tag of success.html */
body.success-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.success-page .main-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.success-page .page-content { /* Assuming success content is within a .page-content wrapper */
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.success-page .site-footer {
    flex-shrink: 0;
}

/* privacy.html & terms.html */
/* Add class="privacy-page" or "terms-page" to body tag */
body.privacy-page .page-content,
body.terms-page .page-content {
    padding-top: calc(var(--header-height) + 30px); /* Header height + extra space */
    padding-bottom: 30px;
}
/* If .page-content is not direct child of body, adjust structure or selector */
.privacy-page .main-container, /* Assuming .main-container is the flex parent */
.terms-page .main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.privacy-page .page-content, /* The content area should grow */
.terms-page .page-content {
    flex-grow: 1;
}


/* Specific image container for sustainability section */
.neumorphic-image-frame {
    padding: 10px;
    background-color: var(--neutral-grey);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-outset);
    display: inline-block;
}
.neumorphic-image-frame img {
    border-radius: calc(var(--border-radius-lg) - 10px); /* Inner image radius to fit padding */
}

/* "Read more" link styling */
.btn-link.neumorphic-link { /* Ensure it's treated as a link button */
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0;
    position: relative;
    background: none !important; /* Override button styles */
    border: none !important;
    box-shadow: none !important;
    text-transform: none; /* Often links are not uppercase */
    letter-spacing: normal;
}
.btn-link.neumorphic-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 2px;
    right: 0;
    background: var(--accent-color);
    transition: width var(--transition-speed) ease;
}
.btn-link.neumorphic-link:hover::after {
    width: 100%;
    left: 0;
    background: var(--accent-color-dark);
}
.btn-link.neumorphic-link:hover {
    color: var(--accent-color-dark) !important; /* Ensure hover color */
}


/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse { /* Target the collapsible container */
        margin-top: 1rem;
        background-color: var(--primary-bg);
        padding: 1rem;
        border-radius: var(--border-radius-md);
        box-shadow: var(--shadow-inset);
    }
    .navbar-nav .nav-link { /* Adjust nav links inside collapsed menu */
        margin: 0.5rem 0;
        display: block; /* Make them full width */
    }
    .hero-section {
      min-height: auto; /* Allow natural height on smaller screens */
      padding-top: calc(var(--header-height) + 2rem); /* Ensure content below header */
      padding-bottom: 2rem;
    }
    .hero-section h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 575.98px) {
    .section-title {
        font-size: 1.8rem;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .btn, button, input[type='submit'], input[type='button'] {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    .neumorphic-card {
        padding: 1rem;
    }
    .resource-title {
        min-height: auto; /* Allow natural height on small screens */
    }
}

/* Cookie Consent Popup (from HTML, basic styling) */
#cookieConsentPopup p a {
    color: #87ceeb !important;
    text-decoration: underline !important;
}

#cookieConsentPopup button { /* Basic button style for cookie consent */
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: none; /* Override global button neumorphic shadow */
}
#cookieConsentPopup button:hover {
    background-color: #45a049;
    box-shadow: none;
}
#cookieConsentPopup button:active,
#cookieConsentPopup button:focus {
    background-color: #3e8e41;
    box-shadow: none !important; /* Ensure no inset shadow */
}