/* ==========================================
   CSS VARIABLES & RESET (LIGHT THEME)
   ========================================== */
:root {
    --primary: #d84315; /* Deep orange for WCAG AA compliance with white text */
    --primary-dark: #bf360c;
    --primary-glow: rgba(216, 67, 21, 0.3);
    
    --bg-main: #f8f9fa; /* Ultra-crisp light gray */
    --bg-surface: #ffffff; /* Pure white for sections */
    --bg-surface-glass: rgba(255, 255, 255, 0.85); /* Light glassmorphism */
    
    --text-main: #111111; /* Sharp dark text */
    --text-muted: #666666; /* Elegant gray */
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--primary);
    color: #fff;
}

/* Accessibility Focus */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: 2px;
}



/* ==========================================
   TYPOGRAPHY & UTILITIES
   ========================================== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(3rem, 8vw, 6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

span {
    color: var(--primary);
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
}

.dark-section {
    background-color: var(--bg-surface);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 20px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px var(--primary-glow);
}

.btn-outline {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.btn-outline:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.btn-text {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-heading);
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}
.btn-text:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

.btn-full { width: 100%; }

/* ==========================================
   NAVIGATION
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: #ffffff;
    letter-spacing: -0.02em;
    transition: var(--transition);
}
.navbar.scrolled .logo {
    color: var(--text-main);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: #ffffff;
}

.navbar.scrolled .nav-link {
    color: var(--text-muted);
}
.navbar.scrolled .nav-link:hover {
    color: var(--text-main);
}

.nav-links .nav-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.5rem;
}

.mobile-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    transition: var(--transition);
}
.navbar.scrolled .mobile-toggle .bar {
    background-color: var(--text-main);
}

/* Navbar over Light Hero (index.html) */
.navbar.navbar-light-hero:not(.scrolled) .logo,
.navbar.navbar-light-hero:not(.scrolled) .nav-link:hover {
    color: var(--text-main);
}
.navbar.navbar-light-hero:not(.scrolled) .nav-link {
    color: var(--text-muted);
}
.navbar.navbar-light-hero:not(.scrolled) .mobile-toggle .bar {
    background-color: var(--text-main);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Secondary Page Header */
.page-header {
    position: relative;
    padding: 12rem 0 6rem;
    color: #fff;
    text-align: center;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.page-header h1 span {
    color: var(--primary);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 6s linear;
    transform: scale(1.05);
}

.hero-slider .slide.active {
    opacity: 1;
    transform: scale(1);
}

.slider-controls {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    justify-content: center;
}

.slider-pager {
    display: flex;
    gap: 12px;
}

.slider-pager .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.2);
    border: 2px solid rgba(0,0,0,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.slider-pager .dot:hover {
    background-color: rgba(0,0,0,0.5);
}

.slider-pager .dot.active {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.2);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(250, 250, 250, 0.8) 0%, rgba(250, 250, 250, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-main);
    font-weight: 500;
    text-shadow: 0 0 15px rgba(255,255,255,0.7);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}


/* ==========================================
   SECTIONS & GRIDS
   ========================================== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    transform: translateY(-4px);
    border-color: #d1d5db;
}

.product-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 2rem;
}

.product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.product-info p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Product Detail Grid (for Tooted page) */
.product-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.product-detail-grid.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 992px) {
    .product-detail-grid.grid-2col {
        grid-template-columns: 1fr;
    }
}

.product-detail-card {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    align-items: center;
}

.product-detail-card.no-image {
    grid-template-columns: 1fr;
    text-align: left;
}

.product-detail-card img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    max-height: 400px;
}

.product-detail-card .content h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.product-detail-card .content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--text-main);
}

.product-detail-card .content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.product-detail-card .content p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.product-detail-card .content p.note {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--primary);
}

@media (max-width: 992px) {
    .product-detail-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.product-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: auto;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-top: 1.5rem;
    transition: color 0.3s;
}

.btn-text:hover {
    color: var(--primary-dark);
}

/* Split Layout (Korteriühistule & Kontakt) */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-list .icon {
    font-size: 2rem;
    background: rgba(245, 124, 0, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--primary);
}

.feature-list strong {
    display: block;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    margin-bottom: 0.2rem;
}

.feature-list span {
    color: var(--text-muted);
}

/* Glass Card */
.glass-card {
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.7) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 30px;
    padding: 4rem;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
    opacity: 0.05;
    z-index: -1;
}

.stat-number {
    font-size: 5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
}

.stat-text {
    font-size: 1.5rem;
    font-weight: 300;
}

/* Gallery Masonry */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 300px;
    gap: 1.5rem;
}

.gallery-item {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.gallery-item:nth-child(1) { grid-column: span 8; }
.gallery-item:nth-child(2) { grid-column: span 4; }
.gallery-item:nth-child(3) { grid-column: span 12; height: 400px;}

.gallery-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 3rem 2rem 2rem;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.gallery-overlay h4 { color: #fff; }
.gallery-overlay p { color: rgba(255,255,255,0.8); }

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Forms */
.contact-details { margin-top: 3rem; }
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
.contact-item .icon { font-size: 1.5rem; }

.glass-form {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.03);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    color: var(--text-main);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition);
    resize: none;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--primary);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--text-muted);
    transition: var(--transition);
    pointer-events: none;
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -1rem;
    font-size: 0.8rem;
    color: var(--primary);
}

.form-group input::placeholder, .form-group textarea::placeholder {
    color: transparent;
}


/* Footer */
.footer {
    padding: 6rem 0 3rem;
    border-top: none;
    background-color: #0f0f0f;
    color: #e0e0e0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 5rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: #fff;
}

.footer-desc {
    color: #a0a0a0;
    max-width: 350px;
    font-weight: 300;
}

.footer-links h3, .footer-contact h3, .footer-newsletter h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.footer-links ul, .footer-contact ul {
    list-style: none;
}

.footer-links li, .footer-contact li {
    margin-bottom: 1rem;
    color: #a0a0a0;
}

.footer-links a, .footer-contact a {
    color: #a0a0a0;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 300;
}

.footer-links a:hover, .footer-contact a:hover {
    color: var(--primary);
}

.footer-contact strong {
    color: #fff;
    font-weight: 500;
    margin-right: 0.5rem;
}

/* Newsletter Input */
.footer-newsletter p {
    color: #a0a0a0;
    margin-bottom: 1.5rem;
    font-weight: 300;
}
.newsletter-form {
    display: flex;
    gap: 0;
}
.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: var(--transition);
}
.newsletter-form input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}
.newsletter-form button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
.newsletter-form button:hover {
    background: var(--primary-dark);
}

/* Socials */
.footer-socials {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}
.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
}
.footer-socials a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #808080;
    font-size: 0.9rem;
    font-weight: 300;
}

.footer-legal a {
    color: #808080;
    text-decoration: none;
    margin-left: 1.5rem;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: #fff;
}

.nav-links li {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}


/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0.5rem 0;
    list-style: none;
}

/* Mega Menu overrides */
.nav-links li.position-static {
    position: static;
}

.dropdown-menu.mega-menu {
    left: 0;
    transform: translateY(10px);
    width: 100%;
    max-width: none;
    padding: 3rem 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown:hover .dropdown-menu.mega-menu {
    transform: translateY(0);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

.mega-menu-column {
    text-align: left;
    padding: 0;
    margin: 0;
}

.mega-menu-column h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin: 0 0 1rem 0 !important;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0 0 0.5rem 0 !important;
    display: block;
}

.mega-menu-column h3 a {
    color: var(--primary);
    text-decoration: none;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2;
}

.mega-menu-column h3 a:hover {
    color: var(--primary-dark);
}

.mega-menu-column ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block;
}

.mega-menu-column ul li {
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important;
    display: block;
    list-style-type: none !important;
}

.mega-menu-column ul li::before {
    display: none !important;
}

.mega-menu-column ul li a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    display: block;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.4;
}

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


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

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.dropdown-menu a:hover {
    background: rgba(0,0,0,0.03);
    color: var(--primary);
}

/* Nested Dropdown Submenu */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.5rem;
    margin-left: 1px;
}

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

.nav-links .nav-btn:hover {
    color: var(--text-main);
}

@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: span 2; }
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
    .footer-brand { grid-column: span 1; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
    .footer-legal a { margin: 0 0.75rem; }
}

/* ==========================================
   ANIMATIONS & REVEALS
   ========================================== */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translate(0, 0) !important;
}

.fade-up { transform: translateY(40px); }
.fade-left { transform: translateX(40px); }
.fade-right { transform: translateX(-40px); }

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 992px) {
    .split-layout { grid-template-columns: 1fr; gap: 3rem; }
    .gallery-item:nth-child(1), .gallery-item:nth-child(2) { grid-column: span 12; }
    h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        height: 100vh; width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        justify-content: center;
        transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    }
    .nav-links.active { right: 0; }
    .mobile-toggle { display: flex; z-index: 1001; }
    .mobile-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-toggle.active .bar:nth-child(2) { opacity: 0; }
    .mobile-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .cursor-dot, .cursor-outline { display: none; } /* Disable custom cursor on mobile */
    body { cursor: auto; }
    .btn { cursor: pointer; }
    
    .hero-actions { flex-direction: column; }
    .glass-card { padding: 2rem; }
}

/* Subpage Hero */
.sub-hero {
    padding: 14rem 0 8rem;
    background-color: #111;
    position: relative;
    text-align: center;
    overflow: hidden;
    color: #ffffff;
}
.sub-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('assets/images/gallery_1_1780560214765.png');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}
.sub-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(17,17,17,1) 0%, rgba(17,17,17,0.3) 50%, rgba(17,17,17,1) 100%);
    z-index: 1;
}
.sub-hero .hero-content {
    position: relative;
    z-index: 2;
}
.sub-hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1rem;
}
.sub-hero p {
    color: #aaaaaa;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}


/* Dropdown Menu */
.dropdown {
    position: relative;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-surface);
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
    z-index: 100;
    list-style: none;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu li {
    margin: 0;
}
.dropdown-menu a {
    display: block;
    padding: 0.6rem 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.95rem;
}
.dropdown-menu a:hover {
    background: var(--bg-main);
    color: var(--primary);
}
.caret {
    display: inline-block;
    margin-left: 4px;
    border-top: 4px solid currentColor;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    vertical-align: middle;
}

/* Catalog Layout */
.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}
@media (max-width: 900px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
}
.catalog-sidebar {
    position: sticky;
    top: 120px;
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}
.catalog-sidebar h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 1rem;
}
.catalog-sidebar ul { 
    list-style: none; 
    padding: 0; 
}
.catalog-sidebar a {
    text-decoration: none;
    display: block;
    transition: var(--transition);
}

/* Level 1: Main Categories */
.catalog-sidebar > ul > li {
    margin-bottom: 1.5rem;
}
.catalog-sidebar > ul > li > a {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.05rem;
    padding: 0.5rem 0;
}

/* Level 2: Sub-categories (Fassaadid, Soklid) */
.catalog-sidebar ul ul {
    margin-top: 0.5rem;
}
.catalog-sidebar ul ul > li {
    margin-bottom: 0.2rem;
}
.catalog-sidebar ul ul > li > a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    margin-left: -0.8rem; /* pull left to align text with parent, while padding gives hover area */
    border-radius: 6px;
}
.catalog-sidebar ul ul > li > a:hover, 
.catalog-sidebar ul ul > li > a.active {
    color: var(--primary);
    background: rgba(245, 124, 0, 0.05);
}

/* Level 3: Deep items (Amroc, Kivex) */
.catalog-sidebar ul ul ul {
    padding-left: 1rem;
    margin-top: 0.2rem;
    border-left: 2px solid rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    margin-left: 0.2rem;
}
.catalog-sidebar ul ul ul > li {
    margin-bottom: 0;
}
.catalog-sidebar ul ul ul > li > a {
    font-weight: 400;
    font-size: 0.9rem;
    padding: 0.3rem 0;
    margin-left: 0;
    border-radius: 0;
    background: transparent !important;
}
.catalog-sidebar ul ul ul > li > a:hover {
    color: var(--primary);
    transform: translateX(4px);
}
