/* style.css */

/*------------------------------------------------------------------
[Table of Contents]

1. CSS Variables
2. Base Styles
   - Body
   - Typography (Headings, Paragraphs, Links)
   - Utilities (Text Shadow, Truncation)
3. Layout
   - Container (Handled by Tailwind, but for reference)
   - Page specific layouts (Success, Legal pages)
4. Components
   - Header & Navigation
   - Hero Section
   - Buttons (Global)
   - Cards (General, Service, Client, Accolade, Partner, Resource)
   - Forms (Inputs, Textarea, Switch)
   - Modals
   - Progress Bars
   - Footer
5. Animations & Transitions
-------------------------------------------------------------------*/

/* 1. CSS Variables
-------------------------------------------------------------------*/
:root {
    --font-primary: 'DM Sans', sans-serif;
    --font-secondary: 'Space Grotesk', sans-serif;

    --color-background: #f0f4f8; /* Light neutral blue/gray */
    --color-surface: #ffffff;    /* For cards, modals etc. */
    --color-text: #333333;       /* Dark gray for main text */
    --color-text-muted: #555555; /* Lighter gray for secondary text */

    --color-primary: #0EA5E9;         /* Sky Blue - Main Accent */
    --color-primary-dark: #0B88C0;    /* Darker Sky Blue for hovers */
    --color-primary-light: #67cbf0;   /* Lighter Sky Blue for highlights */

    --color-secondary: #1E3A8A;       /* Deep Blue - For headings, secondary accent */
    --color-secondary-dark: #162B65;  /* Darker Deep Blue */

    --color-white: #ffffff;
    --color-black: #000000;
    --color-border: #d1d5db; /* Tailwind gray-300 */
    --color-input-border: #cbd5e1; /* Tailwind gray-400 */

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

    --border-radius-sm: 0.25rem; /* 4px */
    --border-radius-md: 0.5rem;  /* 8px */
    --border-radius-lg: 0.75rem; /* 12px */

    --header-height: 5rem; /* 80px */
    --transition-speed: 0.3s;
    --transition-ease: ease-in-out;
}

/* 2. Base Styles
-------------------------------------------------------------------*/
body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    color: var(--color-secondary);
    line-height: 1.3;
    margin-bottom: 0.75em; /* Consistent spacing */
}

h1 { font-size: 2.5rem; } /* Tailwind text-4xl */
h2 { font-size: 2rem; }   /* Tailwind text-3xl */
h3 { font-size: 1.5rem; } /* Tailwind text-2xl */
h4 { font-size: 1.25rem; }/* Tailwind text-xl */

@media (min-width: 768px) {
    h1 { font-size: 3rem; }   /* Tailwind md:text-5xl */
    h2 { font-size: 2.5rem; } /* Tailwind md:text-4xl */
}

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

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

/* Utilities */
.hero-text-shadow {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
}
.section-title-text-shadow {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}
.text-shadow-light {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.truncate-3-lines {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* For ScrollReveal elements */
.scroll-reveal {
    visibility: hidden; /* Hidden until ScrollReveal makes it visible */
}


/* Background Image Styling (Global) */
[style*="background-image"] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Overlay for text on background images */
.bg-image-overlay::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
    z-index: 1; /* Ensure text is above this overlay */
}
.bg-image-overlay > * {
    position: relative;
    z-index: 2; /* Ensure content is above overlay */
}


/* 3. Layout
-------------------------------------------------------------------*/
/* Container is handled by Tailwind's `container mx-auto px-4 sm:px-6 lg:px-8` */

.page-wrapper { /* For generic content pages like privacy, terms */
    padding-top: calc(var(--header-height) + 2rem); /* Header height + extra space */
    padding-bottom: 4rem;
}
.page-wrapper .container {
    max-width: 800px; /* Or your preferred width for text-heavy pages */
}

.success-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height)); /* Full viewport height minus header */
    text-align: center;
    padding: 2rem;
    background-color: var(--color-background);
}
.success-page-container h1 {
    color: var(--color-secondary);
    margin-bottom: 1rem;
}
.success-page-container p {
    color: var(--color-text);
    margin-bottom: 2rem;
    max-width: 600px;
}


/* 4. Components
-------------------------------------------------------------------*/

/* Header & Navigation */
header {
    background-color: var(--color-surface);
    box-shadow: var(--shadow-md);
}
header a {
    text-decoration: none;
}
header .container nav a:not(.volumetric-button) { /* Exclude the CTA button */
    color: var(--color-text-muted);
    font-weight: 500;
}
header .container nav a:hover:not(.volumetric-button),
header .container nav a.active:not(.volumetric-button) { /* For active state via JS */
    color: var(--color-primary);
}
#mobile-menu a {
    color: var(--color-text-muted);
}
#mobile-menu a:hover {
    background-color: var(--color-background);
    color: var(--color-primary);
}

/* Hero Section */
#hero {
    position: relative;
    color: var(--color-white); /* Ensures text is white as per requirement */
    /* Parallax effect through fixed background is in HTML */
}
#hero .absolute.inset-0.bg-black { /* Overlay style */
    opacity: 0.55; /* Slightly increased for better contrast */
}
#hero h1 {
    color: var(--color-white); /* Ensure h1 inside hero is white */
}
#hero p {
    color: #e5e7eb; /* Tailwind gray-200 */
}
.animate-fade-in-down {
    animation: fadeInDown 1s ease-out forwards;
}
.animate-fade-in-up {
    animation: fadeInUp 1s ease-out 0.3s forwards;
}
.animate-bounce-slow {
    animation: bounceSlow 2s infinite 0.6s;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes bounceSlow {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-10px);}
  60% {transform: translateY(-5px);}
}

/* Buttons (Global) */
.btn, button, input[type="submit"], input[type="button"] {
    display: inline-block;
    padding: 0.75rem 1.5rem; /* Tailwind py-3 px-6 approx */
    font-family: var(--font-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-ease);
    border: none;
    user-select: none;
}

.volumetric-button,
button[type="submit"], /* Apply volumetric to default submit buttons */
.btn-primary /* A generic primary button class */
{
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1),
                0 1px 3px rgba(0,0,0,0.08),
                inset 0 -3px 0px rgba(0,0,0,0.15); /* 3D effect */
}
.volumetric-button:hover,
button[type="submit"]:hover,
.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12),
                0 2px 4px rgba(0,0,0,0.08),
                inset 0 -2px 0px rgba(0,0,0,0.1);
}
.volumetric-button:active,
button[type="submit"]:active,
.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08),
                inset 0 2px 3px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-white);
    /* Add volumetric shadows if desired for secondary too */
}
.btn-secondary:hover {
    background-color: var(--color-secondary-dark);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* "Read More" style buttons / links */
.read-more-link {
    font-family: var(--font-secondary);
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-ease), transform var(--transition-speed) var(--transition-ease);
    display: inline-block; /* Allows transform */
}
.read-more-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
    transform: translateX(3px); /* Subtle movement */
}
.read-more-link::after {
    content: ' \2192'; /* Right arrow */
    margin-left: 0.25em;
}

/* Cards */
.card {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-speed) var(--transition-ease), box-shadow var(--transition-speed) var(--transition-ease);
    overflow: hidden; /* Important for child elements like images */
    display: flex;
    flex-direction: column;
    height: 100%; /* For equal height cards in a grid */
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.card-content { /* Generic content area within a card */
    padding: 1.5rem; /* Tailwind p-6 */
    flex-grow: 1; /* Allows content to fill space if card is flex item */
    display: flex;
    flex-direction: column;
    align-items: center; /* STROGO: Center content */
    text-align: center; /* STROGO: Center text */
}
.card-content h3, .card-content h4 {
    color: var(--color-secondary); /* Match section headings */
}
.card-content p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.card-image { /* Container for image in card */
    overflow: hidden;
    width: 100%;
    display: flex; /* STROGO: For centering image */
    justify-content: center; /* STROGO: For centering image */
    align-items: center; /* STROGO: For centering image */
}
/* Specific image styling inside card-image */
.card-image img {
    width: 100%;
    height: auto; /* Maintain aspect ratio by default */
    object-fit: cover; /* STROGO: Ensure image covers area, might need specific height on .card-image */
    transition: transform 0.4s var(--transition-ease);
}
.card:hover .card-image img {
    transform: scale(1.05);
}

/* For card images that are icons/logos (like in Service cards) */
.card-icon-image-container {
    height: 80px; /* Fixed height */
    width: 80px;  /* Fixed width */
    margin-bottom: 1rem; /* Tailwind mb-4 */
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-icon-image-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain; /* For icons/logos */
}

/* About Us card image */
#about .card .card-image {
    height: 24rem; /* 384px - matches h-96 in HTML */
}
#about .card .card-image img {
    height: 100%;
}


/* Client logo styling in Clientele section */
#clientele img {
    max-height: 4rem; /* h-16 in Tailwind */
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter var(--transition-speed) var(--transition-ease), transform var(--transition-speed) var(--transition-ease);
}
#clientele .scroll-reveal:hover img { /* Target the img on parent hover */
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* Partner logo styling */
#partners .scroll-reveal img {
    max-height: 5rem; /* h-20 in HTML */
    object-fit: contain;
    transition: transform var(--transition-speed) var(--transition-ease);
}
#partners .scroll-reveal:hover img {
    transform: scale(1.1);
}

/* External Resources Card adjustments (if needed beyond generic .card) */
#external-resources .card h3 {
    font-size: 1.15rem; /* Slightly smaller for resource titles */
}
#external-resources .card a.volumetric-button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Forms */
.volumetric-input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.85rem 1rem; /* Adjusted padding */
    border: 1px solid var(--color-input-border);
    border-radius: var(--border-radius-md);
    background-color: var(--color-surface);
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: border-color var(--transition-speed) var(--transition-ease), box-shadow var(--transition-speed) var(--transition-ease);
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05); /* Subtle inset shadow */
}
.volumetric-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(var(--color-primary-rgb, 14, 165, 233), 0.3); /* Focus ring */
}
/* Define --color-primary-rgb for the focus ring */
:root {
    --color-primary-rgb: 14, 165, 233; /* Corresponds to #0EA5E9 */
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text);
}

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

/* Switch Component (from HTML inline styles, now centralized) */
.switch-container {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc; /* Tailwind gray-400 equivalent */
    transition: .4s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .slider {
    background-color: var(--color-primary);
}
input:checked + .slider:before {
    transform: translateX(22px);
}
.switch-container span {
    margin-left: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Modals */
.modal {
    display: none; /* JS will toggle this */
    position: fixed;
    inset: 0;
    background-color: rgba(10, 20, 40, 0.85); /* Dark, slightly bluish overlay */
    backdrop-filter: blur(5px); /* Glassmorphism effect */
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000; /* High z-index */
    display: flex; /* Use flex to center, once display is not none */
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0; /* For fade-in animation */
    transition: opacity var(--transition-speed) var(--transition-ease);
}
.modal.is-open { /* Add this class via JS to show modal */
    display: flex;
    opacity: 1;
}
.modal [data-modal-content] { /* Inner modal content block */
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2rem; /* Tailwind p-8 */
    max-width: 500px; /* Tailwind max-w-lg */
    width: 100%;
    transform: scale(0.95);
    opacity: 0;
    transition: transform var(--transition-speed) var(--transition-ease) 0.1s, opacity var(--transition-speed) var(--transition-ease) 0.1s;
}
.modal.is-open [data-modal-content] {
    transform: scale(1);
    opacity: 1;
}
.modal [data-modal-content] h3 {
    color: var(--color-secondary);
    margin-top: 0;
}
.modal [data-modal-content] img {
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
}
.modal [data-modal-content] button[onclick*="closeModal"] { /* Close button in modal header */
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--color-text-muted);
    padding: 0.25rem;
}
.modal [data-modal-content] button[onclick*="closeModal"]:hover {
    color: var(--color-text);
}


/* Progress Bars */
.progress-bar-bg {
    background-color: #e9ecef; /* Lighter gray for track */
    border-radius: 9999px;
    overflow: hidden;
    height: 1rem; /* Consistent height */
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.progress-bar-fill {
    background-color: var(--color-primary);
    height: 100%;
    text-align: center;
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1rem; /* Match height */
    border-radius: 9999px;
    transition: width 1.5s var(--transition-ease);
    /* Width set by JS via data-width attribute */
}

/* Footer */
footer {
    background-color: var(--color-secondary-dark); /* Darker blue for footer */
    color: #adb5bd; /* Lighter gray text */
    padding-top: 4rem;
    padding-bottom: 4rem;
}
footer h3, footer h4 {
    color: var(--color-primary-light); /* Lighter blue for footer headings */
    font-family: var(--font-secondary);
}
footer ul {
    list-style: none;
    padding: 0;
}
footer ul li a {
    color: #ced4da; /* Even lighter gray for links */
    text-decoration: none;
    font-size: 0.9rem;
}
footer ul li a:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}
footer .border-t {
    border-color: rgba(255,255,255,0.15); /* Lighter border for dark bg */
}
footer #currentYear, footer .text-sky-400 {
    color: var(--color-primary-light);
}

/* Cookie Popup (already styled inline in HTML, but can be moved here for consistency if preferred) */
#cookie-popup {
    /* Styles from HTML if moved here */
    /* e.g., background-color: rgba(20, 20, 40, 0.95); color: white; ... */
}
#cookie-popup p {
    color: var(--color-white); /* Ensure P text is white */
}
#accept-cookie {
    /* Styles from HTML if moved here */
    /* e.g., background-color: var(--color-primary); ... */
}


/* 5. Animations & Transitions (General placeholders, specific transitions are on elements)
-------------------------------------------------------------------*/
/* Smooth scroll behavior for anchor links */
html {
    scroll-behavior: smooth;
}

/* Add more complex "morphing" or other animations here if needed, potentially with Anime.js hooks */

/* Fallback for --header-height in specific page layouts */
.legal-page-content, .success-page-container {
    --actual-header-height: var(--header-height, 5rem);
}
.legal-page-content {
    padding-top: calc(var(--actual-header-height) + 2rem);
}
.success-page-container {
    min-height: calc(100vh - var(--actual-header-height));
}