/*---------------------------------------
  COMPONENTS — Buttons, Modal, Lightbox, 
  WhatsApp Float, Reveal states
  Inspired by Barista Cafe
-----------------------------------------*/

/* ============================================
   BUTTONS — Pill style
   ============================================ */
.cta-hero {
    background: var(--custom-btn-bg-color);
    border: 2px solid transparent;
    border-radius: var(--border-radius-large);
    color: var(--white-color);
    font-family: var(--body-font-family);
    font-size: var(--btn-font-size);
    font-weight: var(--font-weight-bold);
    padding: 14px 36px;
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cta-hero:hover {
    background: var(--custom-btn-bg-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(188, 108, 37, 0.4);
}

.cta-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

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

/* Secondary CTA — pill outline */
.cta-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-large);
    color: var(--primary-color);
    font-family: var(--body-font-family);
    font-size: var(--btn-font-size);
    font-weight: var(--font-weight-bold);
    padding: 14px 36px;
    cursor: pointer;
    transition: var(--transition-base);
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

.cta-secondary:hover {
    background: var(--primary-color);
    color: var(--white-color);
}

/* Section-specific overrides for dark backgrounds */
.section-services .cta-secondary {
    border-color: var(--white-color);
    color: var(--white-color);
}

.section-services .cta-secondary:hover {
    background: var(--white-color);
    color: var(--primary-color);
}

/* Primary CTA — filled pill */
.cta-primary {
    background: var(--custom-btn-bg-color);
    border: 2px solid transparent;
    border-radius: var(--border-radius-large);
    color: var(--white-color);
    font-family: var(--body-font-family);
    font-size: var(--btn-font-size);
    font-weight: var(--font-weight-bold);
    padding: 16px 32px;
    text-align: center;
    text-decoration: none;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cta-primary:hover {
    background: var(--custom-btn-bg-hover-color);
    color: var(--white-color);
    transform: translateY(-2px);
}

/* Ghost CTA — transparent with border */
.cta-ghost {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-large);
    color: var(--white-color);
    font-family: var(--body-font-family);
    font-size: var(--btn-font-size);
    font-weight: var(--font-weight-bold);
    padding: 14px 32px;
    text-align: center;
    text-decoration: none;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cta-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white-color);
    color: var(--white-color);
}

.cta-icon {
    font-size: 18px;
}

/* ============================================
   MODAL — Selector
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--dark-soft);
    border-radius: var(--border-radius-medium);
    padding: 48px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
    animation: modalIn 0.4s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 28px;
    cursor: pointer;
    transition: var(--transition-base);
    line-height: 1;
    padding: 4px;
}

.modal-close:hover {
    color: var(--white-color);
}

.modal-eyebrow {
    color: var(--secondary-color);
    font-size: var(--small-font-size);
    font-weight: var(--font-weight-bold);
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.modal-title {
    color: var(--white-color);
    margin-bottom: 8px;
    font-size: var(--h3-font-size);
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--btn-font-size);
    margin-bottom: 32px;
}

.selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.selector-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-medium);
    padding: 24px;
    text-decoration: none;
    transition: var(--transition-base);
    display: block;
}

.selector-card:hover {
    background: rgba(188, 108, 37, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.card-icon-wrap {
    margin-bottom: 16px;
}

.card-icon {
    font-size: 32px;
}

.selector-card h3 {
    color: var(--white-color);
    font-size: var(--h6-font-size);
    margin-bottom: 8px;
}

.selector-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--small-font-size);
    font-weight: var(--font-weight-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

.card-cta {
    color: var(--secondary-color);
    font-size: var(--small-font-size);
    font-weight: var(--font-weight-bold);
}

.modal-footer-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: var(--small-font-size);
    font-weight: var(--font-weight-light);
}

/* ============================================
   LIGHTBOX GALLERY
   ============================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 32px;
    cursor: pointer;
    z-index: 5;
}

.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 40px 20px 20px;
}

.lightbox-img {
    max-width: 85%;
    max-height: 60vh;
    border-radius: var(--border-radius-small);
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    position: relative;
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--btn-font-size);
    font-weight: var(--font-weight-light);
    text-align: center;
    max-width: 800px;
    margin-top: 20px;
}

/* Lightbox CTA */
.lightbox-cta-wrap {
    margin-top: 24px;
    text-align: center;
    background: var(--dark-soft);
    padding: 20px 32px;
    border-radius: var(--border-radius-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalIn 0.5s ease 0.2s both;
}

.lightbox-cta-text {
    color: var(--white-color);
    font-size: var(--p-font-size);
    margin-bottom: 12px;
    font-weight: var(--font-weight-bold);
}

.lightbox-cta-btn {
    display: inline-flex;
}

.lightbox-counter {
    position: absolute;
    top: 28px;
    left: 32px;
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--small-font-size);
    font-weight: var(--font-weight-bold);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   FLOATING WHATSAPP
   ============================================ */
.wa-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: var(--z-wa-float);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    transition: var(--transition-base);
}

.wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.wa-float svg {
    width: 28px;
    height: 28px;
    fill: var(--white-color);
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: transform, opacity;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

[data-reveal-delay="1"] {
    transition-delay: 0.1s;
}

[data-reveal-delay="2"] {
    transition-delay: 0.2s;
}

[data-reveal-delay="3"] {
    transition-delay: 0.3s;
}

[data-reveal-delay="4"] {
    transition-delay: 0.4s;
}

/* ============================================
   GALLERY CTA
   ============================================ */
.services-gallery-cta {
    text-align: center;
    padding-top: 8px;
}

/* ============================================
   GRAIN OVERLAY — subtle texture
   ============================================ */
.grain-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.5'/%3E%3C/svg%3E");
    z-index: 0;
}

/* ============================================
   RESPONSIVE MODAL
   ============================================ */
@media screen and (max-width: 580px) {
    .modal-content {
        padding: 32px 20px;
    }

    .selector-grid {
        grid-template-columns: 1fr;
    }

    .modal-title {
        font-size: var(--h5-font-size);
    }
}