/* ============================================
   Masterlay Renovations - Components
   ============================================ */

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.4s var(--transition-smooth);
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-dark);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(250, 164, 22, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(250, 164, 22, 0.1);
}

.btn-white {
    background: var(--color-text);
    color: var(--color-dark);
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.15);
}

.btn-sm {
    padding: 0.625rem 1.5rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1.1rem 2.75rem;
    font-size: 1rem;
}

/* Button arrow animation */
.btn .btn-arrow {
    transition: transform 0.3s var(--transition-smooth);
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* ---- Site Header ---- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: all 0.4s var(--transition-smooth);
}

.site-header--scrolled {
    padding: 0.75rem 0;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Services Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--transition-smooth);
    pointer-events: none;
}

.nav-item-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.nav-dropdown a:hover {
    background: rgba(250, 164, 22, 0.1);
    color: var(--color-primary);
}

.nav-dropdown a svg {
    width: 18px;
    height: 18px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.nav-dropdown a:hover svg {
    opacity: 1;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: none;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 5rem 1.5rem 2rem;
    touch-action: pan-y;
    opacity: 0;
    transition: opacity 0.5s var(--transition-power);
}

.mobile-menu.open {
    display: flex;
    opacity: 1;
}

.mobile-menu .mobile-nav-link {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.4rem 0;
    display: block;
    transition: color 0.3s ease;
    transform: translateY(30px);
    opacity: 0;
}

.mobile-menu.open .mobile-nav-link {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu a:hover {
    color: var(--color-primary);
}

/* Hamburger */
.hamburger {
    width: 28px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.35s var(--transition-smooth);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; width: 70%; }
.hamburger span:nth-child(3) { top: 18px; }

.hamburger.active span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.hamburger.active span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

/* ---- Service Cards ---- */
.service-card {
    background: var(--color-dark-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all 0.5s var(--transition-smooth);
    cursor: pointer;
    position: relative;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(250, 164, 22, 0.2);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(250, 164, 22, 0.08);
}

.service-card .card-image {
    overflow: hidden;
    height: 220px;
    position: relative;
}

.service-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--transition-smooth);
}

.service-card:hover .card-image img {
    transform: scale(1.08);
}

.service-card .card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(transparent, rgba(26, 26, 26, 0.8));
    pointer-events: none;
}

.service-card .card-body {
    padding: 1.5rem;
}

.service-card .card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-card .card-text {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-card .card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.service-card:hover .card-link {
    gap: 0.75rem;
}

/* ---- Testimonial Cards ---- */
.testimonial-card {
    background: var(--color-dark-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    transition: all 0.4s var(--transition-smooth);
}

.testimonial-card:hover {
    border-color: rgba(250, 164, 22, 0.15);
    transform: translateY(-4px);
}

.testimonial-card .quote-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--color-primary);
    opacity: 0.1;
    line-height: 1;
}

.testimonial-card .stars {
    display: flex;
    gap: 2px;
    margin-bottom: 1rem;
}

.testimonial-card .star {
    color: var(--color-primary);
    width: 18px;
    height: 18px;
}

.testimonial-card .testimonial-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-card .client-name {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
}

.testimonial-card .client-project {
    font-size: 0.8rem;
    color: var(--color-primary);
    margin-top: 0.25rem;
}

/* ---- Section Styles ---- */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-label::before {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--color-primary);
}

.section-heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-subheading {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    line-height: 1.7;
}

/* ---- Form Styles ---- */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--color-dark-card);
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s var(--transition-smooth);
    outline: none;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(250, 164, 22, 0.1);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.form-select {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--color-dark-card);
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s var(--transition-smooth);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A0A0A0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(250, 164, 22, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 140px;
}

/* Form error state */
.form-input.error {
    border-color: #ef4444;
}

.form-error {
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 0.35rem;
    display: none;
}

.form-input.error + .form-error,
.form-group.error .form-error {
    display: block;
}

/* ---- FAQ Accordion ---- */
.faq-item {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.faq-item.active {
    border-color: rgba(250, 164, 22, 0.25);
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s var(--transition-smooth);
    color: var(--color-primary);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--transition-smooth), padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.25rem;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---- Process Steps ---- */
.process-step {
    position: relative;
    text-align: center;
}

.process-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-dark);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 2;
}

/* ---- Preloader ---- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--color-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s var(--transition-power);
}

.preloader.done {
    transform: translateY(-100%);
}

.preloader-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 2rem;
}

.preloader-logo span {
    color: var(--color-primary);
}

.preloader-bar {
    width: 200px;
    height: 2px;
    background: var(--color-dark-card);
    border-radius: 2px;
    overflow: hidden;
}

.preloader-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    animation: loader-progress 1.8s var(--transition-smooth) forwards;
}

/* ---- Quote Calculator ---- */
.quote-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--color-dark-card);
    border: 1.5px solid var(--color-border);
    border-radius: 14px;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quote-card:hover:not(:disabled) {
    border-color: rgba(250, 164, 22, 0.3);
    background: rgba(250, 164, 22, 0.03);
}

.quote-card--active {
    border-color: var(--color-primary);
    background: rgba(250, 164, 22, 0.06);
    box-shadow: 0 0 0 3px rgba(250, 164, 22, 0.1);
}

.quote-card--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.quote-toggle {
    padding: 0.75rem 1.25rem;
    background: var(--color-dark-card);
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.quote-toggle:hover {
    border-color: rgba(250, 164, 22, 0.3);
}

.quote-toggle--active {
    border-color: var(--color-primary);
    background: rgba(250, 164, 22, 0.08);
    color: var(--color-primary);
}

.quote-radio {
    padding: 0.75rem 1rem;
    background: var(--color-dark-card);
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.quote-radio:hover {
    border-color: rgba(250, 164, 22, 0.3);
}

.quote-radio--active {
    border-color: var(--color-primary);
    background: rgba(250, 164, 22, 0.08);
    color: var(--color-primary);
}

.quote-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s;
    vertical-align: middle;
    margin-left: 4px;
    background: none;
    border: none;
    padding: 0;
}

.quote-info-btn:hover {
    opacity: 1;
}

.quote-step--hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.badge-sm {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
}
