/* Luxury Premium Design - STONETREE BNB */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Apply Poppins font globally */
* {
    font-family: 'Poppins', sans-serif !important;
}

/* Base Styles */
:root {
    --primary-bg: #0a0a0a; /* Deep black */

    /* Section Background Colors - Easy to Change */
    /* Change these values to modify section backgrounds across the site */
    --dark-section-bg: #0a0a0a; /* Dark section background (black) */
    --light-section-bg: #141414; /* Light section background (medium gray) */
    --accent-section-bg: #141414; /* Accent section background (darker gray) */

    /* Legacy variables for compatibility */
    --secondary-bg: var(--light-section-bg);
    --accent-bg: var(--accent-section-bg);
    /* Gradient brand colors (champagne/ivory, not yellow) */
    --grad-start: #FEBD8E; /* soft copper */
    --grad-end: #FBFFE4;   /* warm ivory */
    /* Legacy gold tokens kept for compatibility but de-saturated */
    --gold-primary: #E7DFCA;
    --gold-secondary: #D7CBB0;
    --gold-light: var(--grad-start);
    --gold-gradient: var(--grad-end);
    --text-primary: #ffffff; /* Pure white */
    --text-secondary: #cccccc; /* Light gray */
    --text-muted: #aaaaaa; /* Muted gray */
    --text-dark: #0a0a0a; /* For light cards */
    --text-dark-secondary: #404040;
    --text-dark-muted: #6b7280;
    --surface-light: #f5f5f5; /* Section background light */
    --surface-card: #ffffff;  /* Card surface light */
}

/* Reset and base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 300;
    letter-spacing: 0.3px;
}

/* Global layout safeguards */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Loading progress bar */
#loading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
    transition: transform 0.3s ease;
}

.loading-active #loading-progress {
    transform: scaleX(1);
}

/* Scroll padding for anchor navigation on desktop (accounts for fixed header height) */
@media (min-width: 768px) {
    html {
        scroll-padding-top: 100px;
    }
}

/* Adaptive horizontal gutter */
:root { --gutter: 16px; }
@media (min-width: 640px) { :root { --gutter: 20px; } }
@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

/* Unified side paddings for main containers */
header > .mx-auto,
footer > .mx-auto,
section > .mx-auto {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

/* Prevent media overflow */
img, video {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.elegant-text {
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.6;
}

/* Luxury gradient text */
.luxury-grad {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    -webkit-background-clip: text;
    color: transparent;
    background-clip: text;
}

/* Gold accent text */
.gold-accent { color: var(--gold-primary); }

/* Background sections */
.dark-section {
    background: var(--dark-section-bg);
}

.light-section {
    background: var(--light-section-bg);
}

.accent-section {
    background: var(--accent-section-bg);
}

/* True light section for contrast blocks */
.light-contrast {
    background: var(--surface-light);
    color: var(--text-dark);
}

/* Glass morphism effect */
.glass {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(212, 175, 55, 0.1) !important;
    transition: all 0.3s ease;
}

.glass:hover {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(212, 175, 55, 0.2) !important;
}

/* Buttons */
/* Gradient filled button (brand) */
.btn-gradient {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    color: var(--text-dark);
    border: none;
    padding: 12px 24px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    opacity: 0.9;
    z-index: -1;
    border-radius: inherit;
}

.btn-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Subtle outline button with gradient text */
.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 24px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.btn-outline {
    background: transparent;
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
    padding: 12px 24px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn-outline:hover {
    background: var(--gold-primary);
    color: var(--primary-bg);
}

/* Form elements */
.form-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--grad-start);
    box-shadow: 0 0 0 2px rgba(254, 189, 142, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

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

/* Select dropdown styling */
select.form-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cccccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

select.form-input:focus {
    outline: none;
    border-color: var(--grad-start);
    box-shadow: 0 0 0 2px rgba(254, 189, 142, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

select.form-input option {
    background: var(--primary-bg);
    color: var(--text-primary);
    padding: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

/* Checkboxes: enlarge 3x and remove blue focus outline */
/* Target only checkboxes inside our forms to avoid global impact */
form input[type="checkbox"] {
    width: 24px; /* reduced size */
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    background: transparent;
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

form input[type="checkbox"]:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.55);
}

form input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    border-color: transparent;
}

form input[type="checkbox"]::before {
    content: '';
    width: 10px;
    height: 6px;
    transform: translate(0, 0) scale(0) rotate(0deg);
    transition: transform 0.15s ease-in-out;
    border-right: 2px solid var(--text-dark);
    border-bottom: 2px solid var(--text-dark);
    border-left: 0;
    border-top: 0;
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: center;
    margin-left: -5px; /* half of width */
    margin-top: -3px;  /* half of height */
}

form input[type="checkbox"]:checked::before {
    transform: translate(0, 0) scale(1) rotate(45deg);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-left: -8px; /* half width */
    margin-top: -8px;  /* half height */
    border: 2px solid var(--grad-start);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    -webkit-background-clip: text;
    color: transparent;
    background-clip: text;
}

.shadow-luxury {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .glass {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(212, 175, 55, 0.15);
    }

    .btn-gradient, .btn-ghost {
        padding: 10px 20px;
        font-size: 14px;
    }

    .form-input {
        padding: 10px 14px;
    }
}

/* Light cards for services section */
.card-light {
    background: var(--surface-card);
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.card-light .muted { color: var(--text-dark-muted); }
.card-light .secondary { color: var(--text-dark-secondary); }
.card-light .divider { border-top: 1px solid rgba(0,0,0,0.06); }

/* Progress roadmap */
.progress-roadmap {
    position: relative;
    margin-top: 40px;
}

.progress-roadmap::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-primary), var(--grad-start));
    transform: translateY(-50%);
    z-index: 1;
}

.progress-point {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.progress-point::before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--gold-primary);
    border: 2px solid var(--primary-bg);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(231, 223, 202, 0.2);
}

.progress-point.active::before {
    background: var(--grad-start);
    box-shadow: 0 0 0 4px rgba(254, 189, 142, 0.4);
}

.progress-point .label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

/* Process icons */
.process-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    position: relative;
    overflow: hidden;
}

.process-icon svg {
    width: 28px;
    height: 28px;
    color: var(--text-dark);
    z-index: 2;
}

/* Dark card variant */
.card-dark {
    background: var(--accent-section-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.card-dark .muted { color: var(--text-muted); }
.card-dark .secondary { color: var(--text-secondary); }

/* Luxury decorative elements for light sections - REMOVED */
/* Texture removed as per user request */

/* ====== PHONE VALIDATION STYLES ====== */
/* International Telephone Input Custom Styles */
.iti {
    width: 100%;
    position: relative;
}

.iti__flag-container {
    border: none;
    background: transparent;
}

.iti__selected-flag {
    background: transparent;
    border: none;
    outline: none;
    transition: all 0.2s ease;
}

.iti__selected-flag:hover {
    background: rgba(255, 255, 255, 0.1);
}

.iti__arrow {
    border-top-color: var(--text-secondary);
}

.iti__arrow--up {
    border-bottom-color: var(--text-secondary);
}

/* Dropdown styles - Dark theme optimized */
.iti__dropdown-content {
    background: linear-gradient(180deg, #1a1a20, #141418) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(212, 175, 55, 0.1) !important;
    z-index: 99999 !important;
    backdrop-filter: blur(12px) !important;
}

.iti__country-list {
    background: transparent !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
}

/* Custom scrollbar for dropdown */
.iti__country-list::-webkit-scrollbar {
    width: 6px;
}

.iti__country-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.iti__country-list::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

.iti__country-list::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

.iti__country {
    color: #e8e8ea !important;
    padding: 12px 16px !important;
    transition: all 0.2s ease !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.iti__country:last-child {
    border-bottom: none !important;
}

.iti__country:hover,
.iti__country.iti__highlight {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05)) !important;
    color: #ffffff !important;
}

.iti__country-name {
    color: inherit !important;
    font-weight: 500 !important;
}

.iti__dial-code {
    color: rgba(255, 255, 255, 0.9) !important; /* белый вместо золота */
    font-weight: 600 !important;
}

.iti__divider {
    border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
    margin: 4px 0 !important;
}

/* Search input in dropdown */
.iti__search-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    color: #e8e8ea !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    margin: 8px 12px 12px 12px !important;
    width: calc(100% - 24px) !important;
}

.iti__search-input:focus {
    border-color: rgba(212, 175, 55, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15) !important;
    outline: none !important;
}

.iti__search-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Flag container improvements */
.iti__flag-container {
    border-radius: 8px 0 0 8px !important;
    transition: all 0.2s ease !important;
}

.iti__flag-container:hover {
    background: rgba(212, 175, 55, 0.1) !important;
}

/* Selected dial code styling */
.iti__selected-dial-code {
    color: rgba(255, 255, 255, 0.9) !important; /* белый вместо золота */
    font-weight: 600 !important;
    margin-left: 8px !important;
}

/* Гарантируем, что dropdown всегда поверх и не обрезается родителем */
.iti {
    position: relative;
}
/* Когда dropdown рендерится в body, используем класс контейнера библиотеки */
.iti--container {
    z-index: 2147483647 !important; /* максимально высокий слой над всем */
}
.iti--container .iti__dropdown-content {
    z-index: 2147483647 !important;
}
/* Контейнеры форм на странице могут иметь overflow:hidden — переопределяем локально */
.glass, .card, .rounded-xl, .p-8 {
    overflow: visible;
}

/* ====== Hero form: гарантируем, что dropdown стран поверх статистических карточек ====== */
#top form.shadow-luxury {
    position: relative; /* создаём контекст наложения именно для формы */
    z-index: 1000; /* выше, чем соседние элементы секции */
}

/* Validation Error Styles */
.validation-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
    animation: shake 0.4s ease-in-out;
}

.validation-error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important;
}

/* Validation error for text inputs, textareas */
input.validation-error,
textarea.validation-error,
select.validation-error {
    border: 2px solid #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
}

/* Validation error for checkbox/radio containers */
label.validation-error {
    border: 2px solid #ef4444 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
    animation: shake 0.4s ease-in-out;
}

/* Shake animation for validation errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Phone field specific validation */
.phone-validation-field.validation-error {
    border: 2px solid #ef4444;
}

/* Ensure ITI container inherits validation styles */
.iti.iti--show-flags input.validation-error,
.iti.iti--allow-dropdown input.validation-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* Dark theme compatibility for ITI */
.iti input[type="tel"] {
    background: var(--input-bg, rgba(255, 255, 255, 0.05)) !important;
    color: var(--text-primary) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.iti input[type="tel"]:focus {
    background: var(--input-bg-focus, rgba(255, 255, 255, 0.08)) !important;
    border-color: var(--gold-primary, #d4af37) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}

/* Separate dial code styles */
.iti--show-selected-dial-code .iti__selected-dial-code {
    color: var(--text-primary);
    font-weight: 500;
}

.iti--show-selected-dial-code.iti--show-flags .iti__selected-dial-code {
    margin-left: 8px;
}

/* RTL support for dial code */
[dir="rtl"] .iti--show-selected-dial-code.iti--show-flags .iti__selected-dial-code {
    margin-left: 0;
    margin-right: 8px;
}

/* White filter for partner logos */
.filter-white {
    filter: brightness(0) invert(1);
}

