/* Modern responsive stylesheet with light-orange theme */
:root {
    --primary-color: #ffb86b;      /* Light orange */
    --secondary-color: #ff7a18;    /* Vibrant orange */
    --gradient-start: rgba(255,186,107,0.95);
    --gradient-end: rgba(255,122,24,0.95);
    --card-bg: #ffffff;
    --footer-bg: #fffaf5;
    --footer-text: #1f2937;
    --text-color: #1f2937;
    --muted-text: #6b7280;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #fff;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: clamp(3rem, 2rem + 5vw, 5rem) 0; /* Fluid vertical padding */
}

.section.alternate {
    background: rgba(255, 184, 107, 0.05);
}

/* Accessibility helper class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Typography */
h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 1.5rem + 2.5vw, 2.5rem); /* Fluid font size */
    font-weight: 800;
}

h2 {
    font-size: clamp(1.5rem, 1.25rem + 2vw, 2rem); /* Fluid font size */
    text-align: center;
    margin-bottom: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

/* Navbar */
.navbar {
    background: transparent;
    box-shadow: none;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000; /* High z-index for the navbar header */
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.navbar-scrolled {
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
    position: relative;
}

.logo {
    font-family: 'Faustina', serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
}

.logo-suffix {
    font-size: 0.6em;
    font-weight: 500;
    color: var(--muted-text);
    margin-left: 0.3em;
    vertical-align: text-bottom;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1001; /* Ensures button is clickable inside the navbar */
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: block;
    padding: 0.5rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero section */
.hero {
    padding-top: clamp(6rem, 4rem + 10vw, 8rem); /* Fluid top padding */
    padding-bottom: clamp(3rem, 1rem + 8vw, 5rem); /* Fluid bottom padding */
    text-align: center;
    background: linear-gradient(160deg, 
        rgba(255, 184, 107, 0.1) 0%,
        rgba(255, 122, 24, 0.05) 100%);
}

/* subtle lattice/diamond pattern overlay for hero */
.hero {
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* Denser, colored lattice using orange tones that blend nicely with the hero gradient */
    background-image:
        repeating-linear-gradient(45deg, rgba(255,186,107,0.06) 0 6px, transparent 6px 12px),
        repeating-linear-gradient(-45deg, rgba(255,122,24,0.045) 0 6px, transparent 6px 12px);
    background-size: auto auto;
    /* remove problematic blend mode which can cancel the pattern on some browsers/backgrounds */
    mix-blend-mode: none;
    opacity: 0.95; /* stronger visibility per request */
    z-index: 1;
    transform: translateZ(0);
    /* Slow drifting animation to add subtle motion */
    animation: lattice-drift 15s linear infinite;
}

/* Ensure hero content sits above the lattice pseudo-element */
.hero > .container {
    position: relative;
    z-index: 2;
}

@keyframes lattice-drift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 40px 40px, -40px -40px; }
}

.hero h1 {
    margin-bottom: 1.5rem;
}

/* Garud meaning typography when placed inside the hero */
.hero .garud-meaning {
    color: var(--secondary-color);
    margin-top: 1rem;
    margin-bottom: 1.25rem; /* space between Garud text and CTA */
}

.hero .garud-meaning h3 {
    font-family: 'Spicy Rice', cursive;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
}

.hero .garud-meaning p {
    font-family: 'Faustina', serif;
    font-size: 1.1rem;
    color: #2c2a27; /* Rich, dark brown for a legendary feel */
    margin-top: 0.5rem;
}

/* Actions wrapper next to hero CTA */
.hero-actions {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.cta-secondary {
    /* Match primary CTA sizing for consistent appearance */
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.8rem 2rem; /* same as .cta-button */
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

/* Ensure both anchor and button CTAs inside hero-actions render identically */
.hero-actions .cta-button,
.hero-actions .cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    line-height: 1.2;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Enforce equal size for CTAs */
.hero-actions .cta-button,
.hero-actions .cta-secondary {
    min-width: 200px; /* pixel-perfect equality; adjust if you want wider */
}

/* Chevron icon inside the legend button */
.chev {
    margin-left: 0.6rem;
    transition: transform 220ms cubic-bezier(.2,.9,.2,1);
    display: inline-block;
}

/* Rotate chevron when the legend is expanded */
/* Rotate chevron when button has aria-expanded="true" */
button[aria-expanded="true"] .chev {
    transform: rotate(90deg);
}

/* Reset native button styles for consistency across browsers */
.hero-actions button.cta-secondary {
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
}

/* Match hover effect */
.hero-actions .cta-secondary:hover,
.hero-actions .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 24, 0.15);
}

/* Hidden state for garud meaning (for toggling) */
#garud-meaning[aria-hidden="true"] {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 220ms ease;
}

#garud-meaning[aria-hidden="false"] {
    max-height: 1000px; /* large enough to show content */
    opacity: 1;
    transform: translateY(0);
    transition: all 280ms cubic-bezier(.2,.9,.2,1);
}

@media (min-width: 768px) {
    .hero .garud-meaning { margin-bottom: 1.75rem; }
}

.lead {
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.25rem); /* Fluid font size */
    color: var(--muted-text);
    margin-bottom: 2rem;
}

/* Buttons */
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 24, 0.15);
}

/* Grid layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.grid-item {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.grid-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.07);
}

.grid-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.grid-item:hover i {
    color: var(--secondary-color);
}

/* Wrapper for horizontal scroll sections */
.scroll-container {
    position: relative;
}

/* Horizontal scroll for Use Cases section */
#use-cases .grid {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0 2rem 0; /* Add padding for scrollbar and aesthetics */
    margin-left: -1rem; /* Extend to edge of container */
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--primary-color) #f1f1f1; /* Firefox */
    scroll-behavior: smooth; /* Smooth scrolling for JS-driven clicks */
}

/* Custom scrollbar for Webkit browsers */
#use-cases .grid::-webkit-scrollbar {
    height: 8px;
}
#use-cases .grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
#use-cases .grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}
#use-cases .grid::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

#use-cases .grid-item {
    flex: 0 0 320px; /* Set a fixed base width for each card */
}

/* Scroll Arrows for horizontal carousels */
.scroll-arrow {
    display: none; /* Hidden by default, shown via JS */
    align-items: center; /* Vertically center the icon */
    justify-content: center; /* Horizontally center the icon */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.scroll-arrow:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.05);
}

.scroll-arrow.prev {
    left: 0.5rem;
}
.scroll-arrow.next {
    right: 0.5rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
}

.service-card {
    /* Ensure anchor tags behave as block elements */
    display: block;
    text-decoration: none;
    color: inherit; /* Inherit text color from body */

    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -2px rgba(0, 0, 0, 0.05);
    /* Updated transition for hover and scroll-in animation */
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;

    /* Initial state for scroll-in animation */
    opacity: 0;
    transform: translateY(30px);
}

.service-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* GarudVault special styling */
.vault-card {
    border-color: rgba(255, 122, 24, 0.12);
    background: linear-gradient(180deg, rgba(255,246,236,0.8), var(--card-bg));
}

.vault-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.vault-card .vault-icon {
    color: var(--secondary-color);
    margin-right: 0.6rem;
    font-size: 1.15rem;
    vertical-align: middle;
}

/* GarudNet special styling */
.net-card {
    border-color: rgba(99, 102, 241, 0.08);
    background: linear-gradient(180deg, rgba(242,247,255,0.8), var(--card-bg));
}

.net-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #7dd3fc, #60a5fa); /* light blue gradient */
}

.net-card .net-icon {
    color: #2563eb; /* blue tone matching the gradient */
    margin-right: 0.6rem;
    font-size: 1.15rem;
    vertical-align: middle;
}

/* GarudRemote special styling */
.remote-card {
    border-color: rgba(34,197,94,0.08);
    background: linear-gradient(180deg, rgba(240,255,245,0.85), var(--card-bg));
}

.remote-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #34d399, #10b981); /* green gradient */
}

.remote-card .remote-icon {
    color: #059669; /* green tone matching the gradient */
    margin-right: 0.6rem;
    font-size: 1.15rem;
    vertical-align: middle;
}

/* Decorative remote connect icon placed top-right inside the remote card */
.remote-card .remote-connect-icon {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.25rem;
    color: rgba(5,150,105,0.12);
    transform: rotate(20deg);
    pointer-events: none;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1rem;
}

input, textarea, select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-size: 1.125rem; /* increase typed text size to match placeholders (~18px) */
    line-height: 1.4;
    -webkit-appearance: none; /* Remove default OS styling */
    appearance: none;
    background-color: #fff; /* Ensure background is white */
}

select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.7rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

textarea {
    min-height: 150px;
}

.form-success {
    background-color: #e6fffa; /* Light green background */
    color: #047857; /* Dark green text */
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid #a7f3d0; /* Lighter green border */
    font-weight: 500;
}

/* Placeholder styling (increase size by ~2px) */
input::placeholder,
textarea::placeholder {
    font-size: 1.125rem; /* approx 18px if base is 16px */
    color: #9aa4b2;
    opacity: 1; /* ensure consistent opacity */
}

/* WebKit/Blink */
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    font-size: 1.125rem;
    color: #9aa4b2;
}

/* Mozilla Firefox 19+ */
input:-moz-placeholder,
textarea:-moz-placeholder {
    font-size: 1.125rem;
    color: #9aa4b2;
}

/* Mozilla Firefox 4 to 18 */
input::-moz-placeholder,
textarea::-moz-placeholder {
    font-size: 1.125rem;
    color: #9aa4b2;
}

/* Internet Explorer 10+ */
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    font-size: 1.125rem;
    color: #9aa4b2;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(99,102,241,0.06);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.footer-section h4 {
    color: var(--footer-text);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.6rem;
}

.footer-section a {
    color: var(--footer-text);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.4rem;
    transition: transform 0.15s ease, color 0.2s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Modal for QR Code */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
    z-index: 1201;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal[aria-hidden="false"] .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--muted-text);
    cursor: pointer;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    margin-top: 1rem;
    border-radius: 8px;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn svg {
    width: 24px;
    height: 24px;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    /* Card-like positioning for larger screens */
    bottom: 2rem;
    left: 50%;
    width: 90%;
    max-width: 500px;
    background: var(--card-bg); /* White background */
    color: var(--text-color); /* Black text */
    padding: 1.5rem; /* Increased padding for card layout */
    z-index: 1500;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); /* Softer drop shadow */
    border-radius: 12px; /* Rounded corners for card appearance */

    /* Hidden by default */
    transform: translateX(-50%) translateY(calc(100% + 2rem));
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    visibility: hidden;
}

.cookie-banner.visible {
    transform: translateX(-50%) translateY(0);
    visibility: visible;
}

.cookie-banner .container {
    /* Remove container constraints for card layout */
    width: 100%;
    padding: 0;
    display: block; /* Stack content vertically */
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted-text);
    text-align: center; /* Center the paragraph text */
}

.cookie-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.cookie-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0; /* Override default h4 margin */
}

.cookie-icon {
    font-size: 1.75rem; /* Make icon slightly smaller to fit with text */
    color: var(--primary-color);
    margin: 0; /* Remove previous margin */
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on small widths */
    gap: 0.75rem;
    flex-shrink: 0; /* Prevent buttons from shrinking on smaller screens */
    margin-top: 1rem; /* Space between text and buttons */
}

.cookie-banner .cta-button.secondary {
    background: #f3f4f6; /* Light gray for secondary actions on a white card */
    color: var(--text-color);
    box-shadow: none;
}

.cookie-banner .cta-button.secondary:hover {
    background: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    /* Center logo and adjust spacing on mobile */
    nav {
        justify-content: space-between; /* Ensures space for menu button */
        align-items: center;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.4rem;
    }

    /* Move mobile menu button to the left */
    .mobile-menu-btn {
        position: absolute;
        left: 1rem;
        top: 50%; /* Centered vertically */
        transform: translateY(-50%); /* Precise vertical centering */
        z-index: 1101; /* Above the centered logo */
    }

    .mobile-menu-btn span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--primary-color);
        margin: 5px 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        transform-origin: center;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .nav-links {
        /* Dropdown container styles */
        position: absolute;
        top: 100%; /* Position directly below the navbar */
        left: 0;
        width: 100%;
        background: white;
        display: flex;
        flex-direction: column;
        padding: 0.5rem 0;
        border-bottom: 1px solid #eee;
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
        
        /* Hidden state */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.active {
        /* Visible state */
        max-height: 500px; /* Large enough to contain links */
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links li {
        width: 100%;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    /* Staggered animation for list items when menu is active */
    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }
    .nav-links.active li:nth-child(2) { transition-delay: 0.05s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.15s; }

    .nav-links a {
        color: var(--text-color);
        font-size: 1.1rem;
        padding: 0.75rem 1.5rem;
        display: block;
        font-weight: 500;
        text-decoration: none;
        transition: background-color 0.2s ease;
    }

    .nav-links a:hover {
        background-color: rgba(255, 184, 107, 0.1);
    }

    .grid, .services-grid {
        grid-template-columns: 1fr;
    }

    /* Responsive Cookie Banner: full-width card on mobile */
    .cookie-banner {
        bottom: 0.75rem;
        width: calc(100% - 1.5rem);
        max-width: 420px; /* Keep max-width consistent */
        padding: 1.25rem;
    }

    .cookie-banner p {
        text-align: center;
    }
}

/* Larger desktop styles for grid symmetry */
@media (min-width: 1024px) {
    .grid {
        /* Keep the 4-column grid for other sections */
        grid-template-columns: repeat(4, 1fr);
    }

    /* Show scroll arrows on tablet and up (display is controlled by JS) */
    .scroll-arrow {
        display: none; /* JS will set to 'flex' when needed */
    }
}

/* On larger desktops, move arrows outside the container for a cleaner look */
@media (min-width: 1240px) {
    .scroll-arrow.prev { left: -22px; }
    .scroll-arrow.next { right: -22px; }

    /* Specific override to center the 3 items in the "About Us" section */
    #about .grid {
        display: grid; /* Keep it as a grid */
        grid-template-columns: repeat(3, 1fr); /* Explicitly set 3 columns */
        justify-content: center;
        max-width: 1000px; /* Set a max-width to control the tile size */
        margin: 3rem auto 0; /* Center the grid container itself */
    }
}
/* Logo animation: fade + slide up */
@keyframes logo-enter {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* apply animation after transitions are enabled (page load) */
.transitions-enabled .logo {
    animation: logo-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }

    /* Stack hero buttons on very small screens for better layout */
    .hero-actions {
        flex-direction: column;
        align-items: stretch; /* Make buttons full width */
    }
}

/* Success Page Styles */
.success-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(180deg, #fffaf5, #fff);
}

.success-card {
    background: white;
    padding: 2.5rem;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
    max-width: 720px;
    width: 90%;
}

.success-card h1 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.success-card p {
    color: var(--muted-text);
    margin-bottom: 1.25rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.success-actions a {
    text-decoration: none;
}

canvas.confetti {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
}