/* ============================================================
   SAKA FURNITURE – Main Stylesheet (Premium, Refactored & Clean)
   ============================================================ */

/* ---------- 1. FONTS & CSS VARIABLES ---------- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    /* Tipografi */
    --font-primary: 'Roboto', sans-serif;
    --font-heading: 'Roboto', serif;

    /* Warna Utama & Aksen */
    --primary: #1a1a1a;
    --accent: #c5a059;
    --accent-hover: #a0764a;
    --accent-soft: rgba(197, 160, 89, 0.12);
    --light-bg: #f9f7f4;
    --white: #ffffff;
    --text-dark: #2d2d2d;
    --text-muted: #6c757d;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

    /* Radius */
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.15);

    /* Transisi */
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ---------- 2. RESET & BASE STYLES ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 93.75%; /* Base 15px */
    max-width: 100vw;
    overflow-x: hidden !important;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    background-color: var(--light-bg);
    color: var(--text-dark);
    padding-top: 70px; /* Offset fixed navbar */
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent);
}

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

ul, ol {
    padding-left: 0;
    list-style: none;
}

/* Reduced Motion (Aksesibilitas) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    border-radius: 0 0 var(--radius-sm) 0;
    transition: top 0.3s;
}
.skip-link:focus {
    top: 0;
}

/* ---------- 3. NAVIGATION (NAVBAR) ---------- */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background var(--transition), box-shadow var(--transition);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    color: var(--primary) !important;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark) !important;
    transition: color var(--transition);
    padding: 0.5rem 1rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent) !important;
}

/* ---------- 4. HERO BANNER & CAROUSEL ---------- */
.hero-slide-media {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 380px;
    max-height: 640px;
    background: #1a1a1a;
    overflow: hidden;
}

.hero-slide-media img,
.carousel-item img {
    width: 100%;
    height: 70vh;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.9);
}

.hero-slide-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
}

.carousel-caption {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 1.75rem;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    color: var(--text-dark);
}

.carousel-caption h5 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.carousel-caption p {
    font-size: 0.925rem;
    opacity: 0.9;
}

.hero-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 3;
    color: #fff;
    font-size: 1.25rem;
    opacity: 0.85;
    animation: heroBounce 1.8s ease-in-out infinite;
}

@keyframes heroBounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 8px); }
}

/* ---------- 5. BUTTONS & BADGES ---------- */
.btn-gold {
    background-color: var(--accent);
    border: none;
    color: var(--white);
    padding: 0.65rem 1.75rem;
    font-size: 0.9rem;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all var(--transition);
    display: inline-block;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.3);
}

.btn-gold:hover {
    background-color: var(--accent-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(197, 160, 89, 0.4);
}

.btn-outline-dark {
    border-radius: 50px;
    padding: 0.55rem 1.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
}

.btn-outline-dark:hover {
    background-color: var(--primary);
    color: var(--white);
}

.badge-corner,
.badge-category {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    padding: 0.35em 0.75em;
    border-radius: 50rem;
}

/* ---------- 6. CARDS, HOVER & MEDIA UTILITIES ---------- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.hover-lift {
    transition: transform var(--transition), box-shadow var(--transition);
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.img-zoom-wrap {
    overflow: hidden;
    position: relative;
}

.img-zoom-wrap img {
    transition: transform var(--transition-slow);
}

.img-zoom-wrap:hover img {
    transform: scale(1.08);
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.72) 100%);
    opacity: 0;
    transition: opacity var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.img-zoom-wrap:hover .media-overlay {
    opacity: 1;
}

.media-overlay .overlay-cta {
    color: #fff;
    font-weight: 600;
    font-size: 0.825rem;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Text Clamping */
.clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Headings & Section Typography */
.section-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.section-subtitle {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-size: 0.825rem;
    margin-bottom: 1rem;
}

.service-index {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
    opacity: 0.8;
    display: block;
}

/* Stat & Testimonial Styling */
.quote-icon {
    font-size: 1.75rem;
    color: var(--accent);
    opacity: 0.5;
}

.avatar-ring {
    padding: 3px;
    border: 2px solid rgba(197, 160, 89, 0.35);
    border-radius: 50%;
    display: inline-flex;
}

.rating-stars i {
    font-size: 0.8rem;
    color: #f0b429;
}

.stat-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    margin: 0 auto;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.gallery-caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.65) 100%);
    opacity: 0;
    transition: opacity var(--transition);
    padding: 0.85rem;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* ---------- 7. ARTICLE BODY STYLING ---------- */
.article-card {
    transition: transform var(--transition), box-shadow var(--transition);
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.article-card .stretched-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.article-card .btn-gold {
    position: relative;
    z-index: 2;
}

.article-body {
    font-size: 1.025rem;
    line-height: 1.75;
    color: #333333;
}

.article-body p {
    margin-bottom: 1.35rem;
}

.article-body h2 {
    font-size: 1.55rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
    color: #111111;
}

.article-body h3 {
    font-size: 1.28rem;
    font-weight: 600;
    margin-top: 1.6rem;
    margin-bottom: 0.75rem;
    color: #222222;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.article-body blockquote {
    border-left: 4px solid var(--accent);
    padding: 0.8rem 1.2rem;
    margin: 1.8rem 0;
    background-color: var(--accent-soft);
    font-style: italic;
    color: #444444;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-body table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.article-body table th,
.article-body table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.article-body table th {
    background-color: #f1f3f5;
    font-weight: 600;
}

/* ---------- 8. LOGO MARQUEE (PARTNERS) ---------- */
.logo-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.logo-marquee::before, 
.logo-marquee::after {
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    content: "";
    z-index: 2;
    pointer-events: none;
}

.logo-marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--light-bg) 0%, transparent 100%);
}

.logo-marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--light-bg) 0%, transparent 100%);
}

.logo-marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 3rem;
    animation: marqueeScroll 25s linear infinite;
}

.logo-marquee-track:hover {
    animation-play-state: paused;
}

.logo-marquee-track img,
.marquee-item {
    height: 48px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter var(--transition), opacity var(--transition);
}

.logo-marquee-track img:hover,
.marquee-item:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes marqueeScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---------- 9. FLOATING BUTTONS & LIGHTBOX ---------- */
.back-to-top, 
.floating-wa {
    position: fixed;
    right: 25px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    z-index: 999;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.88, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
}

.back-to-top {
    bottom: 25px;
    background-color: var(--primary);
    font-size: 1.1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

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

.back-to-top:hover {
    background-color: var(--accent);
    color: #fff;
    transform: translateY(-5px);
}

.floating-wa {
    bottom: 80px; 
    background-color: #25d366;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.floating-wa:hover {
    background-color: #1ebc57;
    color: #fff;
    transform: scale(1.1) rotate(5deg);
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* ---------- 10. FOOTER & HELPER UTILITIES ---------- */
.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.footer-links a:hover {
    color: var(--accent) !important;
    transform: translateX(5px);
    display: inline-block;
}

.text-gold {
    color: var(--accent) !important;
}

.social-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all var(--transition);
    font-size: 1rem;
}

.social-icon:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

.cta-pattern {
    position: relative;
    overflow: hidden;
}

.cta-pattern::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.6;
    pointer-events: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(197, 160, 89, 0.15);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------- 11. RESPONSIVE FINE TUNING ---------- */
@media (max-width: 1199px) {
    html {
        font-size: 90%; /* ~14.4px */
    }
}

@media (max-width: 991px) {
    html {
        font-size: 87.5%; /* ~14px */
    }

    .section-title {
        font-size: 1.95rem;
    }

    .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        padding: 1rem;
        border-radius: 0 0 var(--radius) var(--radius);
        box-shadow: var(--shadow);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 82.5%;
    }

    /* Perbaikan bug font-size pada mobile */
    .section-title {
        font-size: 1.75rem; 
    }

    .carousel-caption {
        width: 90%;
        padding: 1rem;
    }

    .carousel-caption h5 {
        font-size: 1.35rem;
    }

    .carousel-caption p {
        font-size: 0.85rem;
    }

    .navbar-brand {
        font-size: 1.35rem;
    }

    .hero-slide-media,
    .carousel-item img {
        height: 50vh;
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    .back-to-top, 
    .floating-wa { 
        right: 15px; 
        width: 40px; 
        height: 40px; 
    }

    .back-to-top { 
        bottom: 15px; 
        font-size: 1rem; 
    }

    .floating-wa { 
        bottom: 65px; 
        font-size: 1.25rem; 
    }
}