/* 
   Studio F33 - Professional Design System
   "The Glue" that holds the layout together.
   v2.1 - Enhanced Component Styling
*/

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;800&family=Space+Grotesk:wght@300;500;700&display=swap');

:root {
    /* Professional Palette - Deep Tech */
    --color-dark: #0b0f19;
    --color-dark-surface: #111827;
    --color-primary: #3b82f6;
    --color-accent: #8b5cf6;
    --color-text-main: #f3f4f6;
    --color-text-muted: #9ca3af;
    
    /* Spacing System (Responsive) */
    --spacing-section: clamp(4rem, 8vw, 8rem); /* 64px - 128px */
    --spacing-element: clamp(1.5rem, 3vw, 3rem);
    
    /* Global Radius */
    --radius-lg: 24px;
    --radius-xl: 40px;
}

/* Scoped to CMS Wrapper to avoid breaking Admin Dashboard */
.cms-page-wrapper {
    background-color: var(--color-dark);
    color: var(--color-text-main);
    font-family: 'Manrope', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.cms-page-wrapper h1, 
.cms-page-wrapper h2, 
.cms-page-wrapper h3, 
.cms-page-wrapper h4, 
.cms-page-wrapper h5, 
.cms-page-wrapper h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 1.5rem;
}

/* --- Layout Engine: The "Flow" --- */

/* Every row is a full-width section */
.cms-section {
    position: relative;
    width: 100%;
    padding: var(--spacing-section) 0;
    overflow: hidden;
}

/* Alternate backgrounds for rhythm */
.cms-section:nth-child(odd) {
    background-color: var(--color-dark);
}
.cms-section:nth-child(even) {
    background-color: var(--color-dark-surface);
}

/* Container limits content width but keeps background full */
.cms-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography & Utilities --- */

.display-1 {
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: -0.03em;
    font-weight: 800;
}

.lead-xl {
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: var(--color-text-muted);
    font-weight: 300;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--color-text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Utilities */
.rounded-xl { border-radius: var(--radius-xl) !important; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important; }
.border-white-10 { border: 1px solid rgba(255, 255, 255, 0.1) !important; }
.bg-primary-10 { background-color: rgba(59, 130, 246, 0.1) !important; }
.cursor-pointer { cursor: pointer; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }

/* Utility margins/paddings */
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.ms-2 { margin-left: 0.5rem !important; }
.me-2 { margin-right: 0.5rem !important; }

.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }
.px-5 { padding-left: 3rem !important; padding-right: 3rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

.gap-3 { gap: 1rem !important; }

/* --- Components "The Glue" --- */

/* Buttons */
.btn-glow {
    position: relative;
    background: var(--color-primary);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    text-decoration: none;
    display: inline-block;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
    color: #fff;
}

/* Cards (Bento / Features) */
.card-glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-glass:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.hover-glow {
    transition: all 0.3s ease;
}
.hover-glow:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.hover-scale {
    transition: transform 0.3s ease;
}
.hover-scale:hover {
    transform: translate(-50%, -50%) scale(1.1) !important; /* Keep centered */
}

/* Images */
.img-glow {
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 80px -20px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Logos */
.grayscale-hover img {
    opacity: 0.5;
    filter: grayscale(100%) brightness(200%); /* Bright white logo */
    transition: all 0.3s ease;
}
.grayscale-hover img:hover {
    opacity: 1;
    filter: grayscale(0%) brightness(100%); /* Original color */
    transform: scale(1.1);
}

/* Timeline */
.timeline-step { 
    position: relative; 
    padding-left: 3rem; 
    border-left: 2px solid rgba(255,255,255,0.1); 
    padding-bottom: 3rem; 
}
.timeline-step::before { 
    content: ''; 
    position: absolute; 
    left: -9px; 
    top: 0; 
    width: 16px; 
    height: 16px; 
    background: var(--color-dark); 
    border: 2px solid var(--color-primary);
    border-radius: 50%; 
    box-shadow: 0 0 15px var(--color-primary);
    transition: all 0.3s ease;
}
.timeline-step:hover::before {
    background: var(--color-primary);
    transform: scale(1.3);
}
.timeline-step:last-child { 
    border-left: 2px solid transparent; 
}

/* Accordion */
.accordion-item { 
    background: transparent !important; 
    border: 1px solid rgba(255,255,255,0.1) !important; 
    margin-bottom: 1rem; 
    border-radius: 1rem !important; 
    overflow: hidden; 
}
.accordion-button { 
    background: rgba(255,255,255,0.02) !important; 
    color: var(--color-text-main) !important; 
    border: none; 
    font-weight: 600;
    padding: 1.5rem;
}
.accordion-button:not(.collapsed) { 
    background: rgba(59, 130, 246, 0.1) !important; 
    color: var(--color-primary) !important; 
    box-shadow: none !important; 
}
.accordion-button::after {
    filter: invert(1);
}
.accordion-button:not(.collapsed)::after {
    filter: invert(1) sepia(1) saturate(5) hue-rotate(200deg);
}
.accordion-body {
    background: rgba(0,0,0,0.2);
    color: var(--color-text-muted);
    padding: 1.5rem;
}

/* Forms */
.form-control {
    background-color: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
    padding: 1rem;
    border-radius: 12px;
}
.form-control:focus {
    background-color: rgba(255,255,255,0.05) !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}
.form-control::placeholder {
    color: rgba(255,255,255,0.3);
}

/* Map */
iframe {
    filter: invert(90%) hue-rotate(180deg) contrast(0.9);
    border-radius: var(--radius-xl);
}

/* Decorative Elements */
.deco-blob {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.deco-top-right { top: -20%; right: -10%; }
.deco-bottom-left { bottom: -20%; left: -10%; }

/* Admin Editor Overrides */
.cms-editor-canvas {
    background: var(--color-dark);
    padding: 0 !important; /* Let sections handle padding */
}
.cms-editor-row {
    background: transparent !important;
    border: 1px dashed rgba(255,255,255,0.1) !important;
    margin: 0 !important;
}
.cms-editor-row:hover {
    border-color: var(--color-primary) !important;
    background: rgba(59, 130, 246, 0.05) !important;
}

/* Header & Navbar Styling for Dark Theme */
header {
    background: rgba(11, 15, 25, 0.8) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

header .logo {
    color: #fff !important;
    font-weight: 800;
    font-size: 1.5rem;
    text-decoration: none;
    letter-spacing: -0.02em;
}

header .nav-links a {
    color: var(--color-text-muted) !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

header .nav-links a:hover {
    color: #fff !important;
}

header .mobile-menu-toggle {
    color: #fff !important;
    background: transparent;
    border: none;
    font-size: 1.5rem;
}

/* Mega Menu & Dropdowns */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

/* Dropdown Basic */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--color-dark-surface);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--color-text-muted) !important;
}

.dropdown-menu a:hover {
    background: rgba(255,255,255,0.05);
    color: #fff !important;
}

/* Mega Menu */
.has-mega-menu {
    position: static; /* Allows mega menu to span full width */
}

.mega-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--color-dark-surface);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 2rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    z-index: 999;
}

.has-mega-menu:hover .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-list li {
    margin-bottom: 0.5rem;
}

.mega-menu-list a {
    color: var(--color-text-muted) !important;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.mega-menu-list a:hover {
    color: var(--color-primary) !important;
    padding-left: 5px;
}
