/*
Theme Name: Rebel Design Studio
Theme URI: https://rebelstudio.ro
Author: Rebel Design Studio
Author URI: https://rebelstudio.ro
Description: Custom WordPress Theme for Rebel Design Studio - Premium Interior Design & Turnkey Execution in Iași and Moldova.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: rebeldesignstudio
*/

/* ==========================================================================
   1. RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Manrope', sans-serif;
    background-color: #F4F4F0;
    color: #2C2C2C;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.5;
    overflow-x: hidden;
}

::selection {
    background: #8A9A86;
    color: #F4F4F0;
}

a {
    color: #8A9A86;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: #6f7e6b;
}

button, input, select, textarea {
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   2. TYPOGRAPHY & HEADINGS
   ========================================================================== */
h1, h2, h3, h4, h5, h6, .font-serif {
    font-family: 'Playfair Display', serif;
}

.text-sage {
    color: #8A9A86;
}

.text-gold {
    color: #D4A373;
}

.text-muted {
    color: #5c5c57;
}

.page-editable-content,
.page-content-area {
    max-width: 760px;
    color: #3c3c37;
    font-size: 16.5px;
    line-height: 1.7;
}

.page-editable-content h2,
.page-content-area h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 600;
    color: #2C2C2C;
    margin: 0 0 22px;
    line-height: 1.2;
}

.page-editable-content h3,
.page-content-area h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 600;
    margin: 28px 0 12px;
}

.page-editable-content p,
.page-content-area p {
    margin: 0 0 18px;
}

.page-editable-content p:last-child,
.page-content-area p:last-child {
    margin-bottom: 0;
}

.calc-result-range {
    font-family: 'Playfair Display', serif;
    font-size: clamp(22px, 2.5vw, 36px);
    font-weight: 600;
    margin-top: 14px;
    line-height: 1.25;
}

.calc-result-range .calc-amount {
    white-space: nowrap;
}

/* ==========================================================================
   3. ANIMATIONS
   ========================================================================== */
@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes slowZoom {
    from {
        transform: scale(1.08);
    }
    to {
        transform: scale(1);
    }
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   4. LAYOUT & UTILITIES
   ========================================================================== */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 32px;
}

.container-narrow {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 32px;
}

.container-medium {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 32px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 150;
    transition: background 0.4s ease, box-shadow 0.4s ease;
    background: transparent;
}

.header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 32px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-header.scrolled,
.site-header.solid-header {
    background: #F4F4F0;
    box-shadow: 0 1px 0 rgba(44, 44, 44, 0.08);
}

.logo-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #F4F4F0;
    transition: color 0.3s ease;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 1.15;
}

.logo-btn span,
.brand-accent {
    font-style: italic;
    font-weight: 400;
}

.site-header a.logo-btn:hover,
.site-header a.logo-btn:focus {
    color: #F4F4F0;
}

.desktop-nav {
    display: flex;
    gap: 34px;
    align-items: center;
}

.nav-link {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #F4F4F0;
    letter-spacing: 0.01em;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.site-header a.nav-link:hover,
.site-header a.nav-link:focus {
    color: #F4F4F0;
}

.nav-link.active,
.nav-link:hover,
.nav-link.is-mega-open {
    border-bottom-color: #8A9A86;
}

.nav-link.active {
    font-weight: 700;
}

.site-header.scrolled .logo-btn,
.site-header.solid-header .logo-btn,
.site-header.scrolled .nav-link,
.site-header.solid-header .nav-link,
.site-header.scrolled .burger-btn,
.site-header.solid-header .burger-btn,
.site-header.scrolled a.logo-btn:hover,
.site-header.solid-header a.logo-btn:hover,
.site-header.scrolled a.nav-link:hover,
.site-header.solid-header a.nav-link:hover,
.site-header.scrolled a.logo-btn:focus,
.site-header.solid-header a.logo-btn:focus,
.site-header.scrolled a.nav-link:focus,
.site-header.solid-header a.nav-link:focus {
    color: #2C2C2C;
}

.header-cta-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header-cta {
    background: #8A9A86;
    color: #F4F4F0;
    border: none;
    padding: 12px 22px;
    border-radius: 2px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.25s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

a.header-cta,
a.header-cta:hover,
a.header-cta:focus {
    color: #F4F4F0;
    background: #8A9A86;
}

a.header-cta:hover,
a.header-cta:focus {
    background: #6f7e6b;
}

/* Mega menu — same panel as Materiale template */
.mega-menu {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: #F4F4F0;
    border-top: 1px solid rgba(44, 44, 44, 0.08);
    box-shadow: 0 20px 40px rgba(44, 44, 44, 0.1);
    overflow: hidden;
    transition: opacity 0.28s ease, transform 0.28s ease;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    z-index: 160;
}

.mega-menu.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 36px 32px 40px;
    display: grid;
    grid-template-columns: 1fr 2.4fr;
    gap: 48px;
}

.mega-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.15;
    color: #2C2C2C;
}

.mega-copy {
    color: #5c5c57;
    font-size: 14px;
    line-height: 1.55;
    margin-top: 14px;
    max-width: 240px;
}

.mega-all {
    margin-top: 18px;
    background: none;
    border: none;
    color: #8A9A86;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    display: inline-block;
    text-decoration: none;
}

a.mega-all:hover,
a.mega-all:focus {
    color: #6f7e6b;
}

.mega-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.mega-item {
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px 16px;
    border-radius: 3px;
    transition: background 0.2s ease;
    text-decoration: none;
    display: block;
}

a.mega-item:hover,
a.mega-item:focus {
    background: #E3DCD2;
    color: inherit;
}

.mega-item-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
}

.mega-item-short {
    color: #5c5c57;
    font-size: 13px;
    line-height: 1.45;
    margin-top: 4px;
}

.burger-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: #F4F4F0;
    padding: 8px;
}

.burger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
}

/* Full-screen mobile drawer */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #F4F4F0;
    display: none;
    flex-direction: column;
    padding: 28px 32px;
}

.mobile-menu.is-open {
    display: flex;
    animation: riseIn 0.35s ease both;
    overflow-y: auto;
}

.mobile-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
}

.mobile-menu-logo {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 600;
    color: #2C2C2C;
}

.mobile-menu-logo span {
    font-style: italic;
    font-weight: 400;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #2C2C2C;
    line-height: 1;
    padding: 0;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 36px;
}

.mobile-nav-link {
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #E3DCD2;
    padding: 18px 0;
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: #2C2C2C;
    text-decoration: none;
    cursor: pointer;
}

a.mobile-nav-link,
a.mobile-nav-link:hover,
a.mobile-nav-link:focus {
    color: #2C2C2C;
}

.mobile-nav-link.active {
    color: #8A9A86;
}

.mobile-menu-cta {
    margin-top: 32px;
    background: #8A9A86;
    color: #F4F4F0;
    border: none;
    padding: 16px;
    border-radius: 2px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

a.mobile-menu-cta,
a.mobile-menu-cta:hover,
a.mobile-menu-cta:focus {
    color: #F4F4F0;
    background: #8A9A86;
}

a.mobile-menu-cta:hover,
a.mobile-menu-cta:focus {
    background: #6f7e6b;
}

.mobile-menu-contact {
    margin-top: auto;
    padding-top: 28px;
    border-top: 1px solid #E3DCD2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-contact-label {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8A9A86;
    font-weight: 600;
}

.mobile-menu-contact a {
    color: #2C2C2C;
    text-decoration: none;
}

.mobile-menu-contact a:first-of-type {
    font-size: 20px;
    font-weight: 600;
}

.mobile-menu-contact a:nth-of-type(2) {
    font-size: 17px;
}

.mobile-contact-addr {
    font-size: 14px;
    color: #6b6b66;
}

body.admin-bar .site-header {
    top: 32px;
}

body.admin-bar .mega-menu {
    top: 76px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* Range sliders */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #E3DCD2;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #D4A373;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

input[type=range]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #D4A373;
    cursor: pointer;
}

/* Masonry portfolio grid */
.masonry-grid {
    columns: 3;
    column-gap: 22px;
}

.masonry-card {
    break-inside: avoid;
    width: 100%;
    margin-bottom: 22px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    display: block;
    text-align: left;
}

/* Modal Case Study Drawer */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(30, 30, 28, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: flex-end;
    animation: riseIn 0.3s ease;
}

.modal-drawer {
    width: min(760px, 100%);
    height: 100%;
    background: #F4F4F0;
    overflow-y: auto;
}

/* Mobile sticky quick action bar */
.quickbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 140;
    background: #2C2C2C;
    display: none;
    align-items: center;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1100px) and (min-width: 861px) {
    .masonry-grid {
        columns: 2 !important;
    }
}

@media (max-width: 860px) {
    [data-desktop-nav],
    [data-desktop-cta],
    [data-mega] {
        display: none !important;
    }
    
    .burger-btn {
        display: flex !important;
    }
    
    .quickbar {
        display: flex !important;
    }
    
    main {
        padding-bottom: 60px;
    }
    
    .masonry-grid {
        columns: 1 !important;
    }
    
    [data-calc-grid],
    [data-svc-grid],
    [data-onsite],
    [data-incl],
    [data-aud-grid] {
        grid-template-columns: 1fr !important;
    }
    
    [data-footer-grid] {
        grid-template-columns: 1fr 1fr !important;
    }
    
    aside[style*="sticky"] {
        position: static !important;
    }
}

@media (max-width: 560px) {
    [data-footer-grid] {
        grid-template-columns: 1fr !important;
    }
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.footer-social-link {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(227, 220, 210, 0.28);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E3DCD2;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
    border-color: rgba(227, 220, 210, 0.7);
    color: #F4F4F0;
    transform: translateY(-1px);
    outline: none;
}

.footer-social-svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    display: block;
}

.footer-copy-sep {
    margin: 0 0.65em;
    opacity: 0.4;
}

.avri-credit {
    color: inherit;
    text-decoration: none;
    font-weight: 400;
}

.avri-credit [itemprop="name"] {
    color: #E3DCD2;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.avri-credit-dot {
    color: #D4A373;
}

.avri-credit:hover,
.avri-credit:focus {
    color: #F4F4F0;
}

.avri-credit:hover [itemprop="name"],
.avri-credit:focus [itemprop="name"] {
    color: #F4F4F0;
}
