/* form.css */

:root {
    --bg-color: #1e1e1e;
    --card-bg-color: #2b2b2b;
    --primary-text-color: #e0e0e0;
    --secondary-text-color: #a0a0a0;
    --accent-color: #c5b398;
    --border-color: #444444;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: #1e1e1e;
    color: #e0e0e0;
    min-height: 100vh;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
}

/* Background Gallery & Vignette */
.background-gallery-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* Fixed height to prevent jumping on mobile scroll */
    z-index: 0;
    overflow: hidden;
    transform: translateZ(0);
    /* Hardware acceleration */
}

.gallery-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out, transform 15s ease-out;
    transform: scale(1);
}

.gallery-item.active {
    opacity: 1;
    transform: scale(1.1);
}

/* Cinematic Vignette Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Container & Layout */
.form-page-container {
    max-width: 700px;
    padding: 60px 20px;
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

/* Luxury Glass Card */
.form-card {
    background: rgba(30, 30, 30, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: 24px;
    border: 1px solid rgba(197, 179, 152, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    opacity: 0;
}

/* Typography */
.header {
    text-align: center;
    margin-bottom: 30px;
    opacity: 0;
}

.header img {
    max-width: 180px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

/* Title Darkening */
.title-container {
    text-align: center;
    margin-bottom: 50px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 30px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.main-title {
    font-size: 2.5em;
    font-weight: 300;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
    margin-top: 0;
}

.title-subtitle {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin-bottom: 0;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

/* Form Groups */
.form-group {
    margin-bottom: 40px;
    opacity: 0;
}

.form-group label {
    display: block;
    font-size: 0.95em;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Fix for dropdown z-index */
.phone-group {
    position: relative;
    z-index: 50;
}

/* Animated Inputs */
.input-wrapper {
    position: relative;
}

input[type="text"],
input[type="tel"],
input[type="email"] {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    color: #fff;
    font-size: 1.2em;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus {
    outline: none;
    border-bottom-color: transparent;
}

/* Remove Autism White Background from Autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #2b2b2b inset;
    -webkit-text-fill-color: white !important;
    /* Keep text color force */
    transition: background-color 5000s ease-in-out 0s;
}

/* Error State for Inputs */
input.error {
    border-bottom-color: #ff6b6b;
    box-shadow: 0 1px 0 0 #ff6b6b;
}

/* Gold Focus Line Animation */
.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

input:focus+.input-focus-line {
    width: 100%;
}

/* Specific fix for intl-tel-input */
.iti {
    width: 100%;
    display: block;
}

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

.iti__selected-flag {
    background: transparent;
}

.iti input[type="tel"] {
    padding-left: 90px;
}

/* Dropdown Styling */
.iti__country-list {
    background-color: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--accent-color);
    color: #fff;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    border-radius: 12px;
    margin-top: 10px;
    width: 100%;
    min-width: 300px;
    max-width: 100%;
    white-space: normal;
    overflow-x: hidden;
}

.iti__country {
    padding: 12px 15px;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

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

.iti__country:hover,
.iti__country.iti__highlight {
    background-color: rgba(197, 179, 152, 0.2);
}

.iti__country-name {
    color: #fff;
    font-size: 0.9em;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
    text-align: left;
}

.iti__dial-code {
    color: var(--accent-color);
    flex-shrink: 0;
    font-weight: 600;
}

/* Radio & Checkbox Cards */
.radio-group,
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.radio-card,
.checkbox-card {
    position: relative;
    cursor: pointer;
}

.radio-card input,
.checkbox-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-content,
.checkbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    text-align: center;
    min-height: 80px;
    font-weight: 400;
}

.radio-card:hover .radio-content,
.checkbox-card:hover .checkbox-content {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(197, 179, 152, 0.5);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.radio-card input:checked+.radio-content,
.checkbox-card input:checked+.checkbox-content {
    background: rgba(197, 179, 152, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 0 20px rgba(197, 179, 152, 0.2);
}

.form-section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(197, 179, 152, 0.5), transparent);
    margin: 50px 0;
    opacity: 0;
}

/* Privacy Checkbox */
.privacy-checkbox-group {
    margin: 25px 0;
    position: relative;
    z-index: 1;
}

.privacy-label-container {
    display: block;
    position: relative;
    padding-left: 40px;
    cursor: pointer;
    user-select: none;
    text-align: left;
    min-height: 24px;
}

.privacy-real-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.privacy-custom-box {
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #c5b398;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.privacy-custom-box::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 11px;
    border: solid #c5b398;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.privacy-real-checkbox:checked+.privacy-custom-box {
    background: rgba(197, 179, 152, 0.2);
    border-color: #c5b398;
    box-shadow: 0 0 15px rgba(197, 179, 152, 0.3);
}

.privacy-real-checkbox:checked+.privacy-custom-box::after {
    transform: rotate(45deg) scale(1);
    opacity: 1;
}

.privacy-label-container:hover .privacy-custom-box {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.privacy-text-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    font-weight: 400;
    line-height: 1.4;
    padding-top: 2px;
}

/* ... omitted ... */

.privacy-text-label a {
    color: #c5b398;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.privacy-text-label a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(197, 179, 152, 0.5);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 20px;
    margin-top: 20px;
    background: linear-gradient(135deg, #c5b398 0%, #a39075 100%);
    color: #1e1e1e;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(197, 179, 152, 0.3);
    opacity: 0;
    position: relative;
    z-index: 1;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(197, 179, 152, 0.5);
    filter: brightness(1.1);
}

/* === MESSAGES & ALERTS (Restored) === */
.form-message {
    margin-top: 25px;
    padding: 0;
    text-align: center;
    font-size: 1.1em;
    border-radius: 12px;
    transition: all 0.4s ease;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.form-message.success,
.form-message.error {
    padding: 20px;
    height: auto;
    opacity: 1;
    margin-top: 30px;
    border: 1px solid transparent;
}

/* Success Style (Green) */
.form-message.success {
    background: rgba(76, 209, 55, 0.1);
    border-color: #4cd137;
    color: #4cd137;
    box-shadow: 0 10px 30px rgba(76, 209, 55, 0.15);
    text-shadow: 0 0 10px rgba(76, 209, 55, 0.4);
}

/* Error Style (Red) */
.form-message.error {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
    color: #ff6b6b;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.15);
}

/* Input Field Error Text */
.error-msg {
    color: #ff6b6b;
    font-size: 0.85em;
    margin-top: 8px;
    display: block;
    min-height: 0;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 1;
}

.error-msg.hide {
    display: none;
}

/* Add Exclamation Icon to error */
.error-msg:not(:empty):not(.hide)::before {
    content: '⚠ ';
    margin-right: 5px;
}

/* Entrance Animations */
.animate-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .form-page-container {
        padding: 20px 15px;
    }

    .form-card {
        padding: 30px 20px;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    .main-title {
        font-size: 1.8em;
    }

    .radio-group,
    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .radio-content,
    .checkbox-content {
        min-height: 60px;
    }

    .privacy-text-label {
        font-size: 0.85em;
    }

    .iti__country-list {
        max-width: 85vw !important;
        min-width: 0 !important;
    }
}

/* === PRIVACY POLICY PAGE STYLES === */
/* Эти стили активируются только на странице privacy.php */

.privacy-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

/* Override default header opacity for privacy page */
.privacy-container .header {
    opacity: 1 !important;
}

.privacy-content {
    background-color: #2b2b2b;
    /* Opaque Dark Grey */
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #444;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    margin-top: 20px;
    color: #a0a0a0;
}

.privacy-content h1 {
    color: #c5b398;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-align: center;
    text-transform: uppercase;
    word-wrap: break-word;
    font-weight: 300;
}

.privacy-content h2 {
    color: #c5b398;
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    font-weight: 400;
}

.privacy-content p {
    margin-bottom: 15px;
    color: #a0a0a0;
    line-height: 1.6;
}

.privacy-content ul {
    margin-bottom: 15px;
    padding-left: 20px;
    color: #a0a0a0;
}

.privacy-content li {
    margin-bottom: 10px;
}

.privacy-content a {
    color: #c5b398;
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-content a:hover {
    color: #fff;
    text-decoration: underline;
}

.back-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-nav:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(197, 179, 152, 0.5);
    transform: translateY(-2px);
}

.back-nav span {
    font-size: 1.2em;
    line-height: 1;
    margin-bottom: 2px;
}

/* Mobile styles for privacy page */
@media (max-width: 768px) {
    .privacy-container {
        padding: 20px 15px;
    }

    .privacy-content {
        padding: 25px 20px;
    }

    .privacy-content h1 {
        font-size: 1.3em;
        /* Decreased from 1.6em to fit long words */
        line-height: 1.3;
        word-wrap: normal;
        /* Disable breaking words in the middle */
        overflow-wrap: normal;
    }


    .privacy-content h2 {
        font-size: 1.2em;
    }
}

/* OTP Modal */
.otp-modal-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.otp-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.otp-modal-glass {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(197, 179, 152, 0.4);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.otp-modal-overlay.active .otp-modal-glass {
    transform: scale(1);
}

.otp-title {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

.otp-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95em;
    margin-bottom: 30px;
    line-height: 1.5;
}

.otp-input-group input {
    text-align: center;
    font-size: 2em;
    letter-spacing: 10px;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
}

.otp-input-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(197, 179, 152, 0.2);
    outline: none;
}

.otp-input-group input::placeholder {
    letter-spacing: 1px;
    font-size: 0.5em;
    opacity: 0.5;
    font-weight: 400;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .otp-input-group input::placeholder {
        font-size: 0.4em;
    }
}

.text-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 15px;
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
}

.text-btn:hover {
    color: #fff;
}

/* === FOOTER STYLES === */
.site-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9em;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.company-name {
    font-weight: 600;
    color: #fff;
    opacity: 0.9;
}

.footer-phone {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-phone:hover {
    color: var(--accent-color);
}

.footer-socials {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-icon img {
    width: 28px;
    height: 28px;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.social-icon:hover img {
    opacity: 1;
    transform: translateY(-2px);
}

/* Mobile Footer */
@media (max-width: 480px) {
    .site-footer {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        margin-top: 30px;
        position: relative;
        z-index: 5;
    }

    .footer-socials {
        width: 100%;
        justify-content: center;
    }
}

/* Specific WhatsApp Icon Adjustment (Global) */
.social-icon[href*="wa.me"] img {
    transform: scale(1.15);
    /* Make it 15% larger as requested */
}

.social-icon[href*="wa.me"]:hover img {
    transform: scale(1.15) translateY(-2px);
    /* Maintain scale on hover */
}

/* Footer Entrance Animation */
/* Footer Entrance Animation */
.site-footer.animate-up {
    /* JS triggers this class on scroll */
    animation-name: footerSlideUp !important;
    animation-duration: 1.0s !important;
    /* Standard speed */
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55) !important;
    animation-fill-mode: forwards !important;
    opacity: 0;
}

@keyframes footerSlideUp {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Segmented Control Switch */
.contact-switch-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 5px;
}

.contact-switch {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.switch-option {
    padding: 6px 0;
    /* Removing side padding, using width */
    width: 60px;
    /* Fixed equal width */
    text-align: center;
    font-size: 0.8em;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 2;
    transition: color 0.3s;
    user-select: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.switch-option svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: fill 0.3s;
}

.switch-option.active {
    color: #1e1e1e;
    font-weight: 600;
}

.switch-selection {
    position: absolute;
    top: 2px;
    left: 2px;
    height: calc(100% - 4px);
    width: 60px;
    /* Match option width */
    background: var(--accent-color);
    border-radius: 6px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Telegram Input Specifics */
#telegram-container input {
    width: 100%;
    padding: 15px 0;
    font-size: 1.2em;
    /* Match main inputs */
    color: #fff;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
}

#telegram-container input:focus {
    outline: none;
    border-bottom-color: transparent;
    /* Let the gold line show */
}