/* ==========================================================================
   AI Phone Finder Specific Styles - ai_phone_finder.css
   ========================================================================== */

/* CSS @property для анимации фона */
@property --g2-1-x-position { syntax: "<percentage>"; inherits: false; initial-value: 87.96875%; }
@property --g2-1-y-position { syntax: "<percentage>"; inherits: false; initial-value: 91.1328125%; }
@property --g2-2-x-position { syntax: "<percentage>"; inherits: false; initial-value: 13.398437500000002%; }
@property --g2-2-y-position { syntax: "<percentage>"; inherits: false; initial-value: 82.734375%; }

:root {
    --g2-1-x-position: 87.96875%;
    --g2-1-y-position: 91.1328125%;
    --g2-2-x-position: 13.398437500000002%;
    --g2-2-y-position: 82.734375%;
}

@keyframes g-2 {
    50% { 
        --g2-1-x-position: 15%; 
        --g2-1-y-position: 15%; 
        --g2-2-x-position: 61.21093749999999%; 
        --g2-2-y-position: 13.750000000000002%; 
    } 
}

body {
    font-family: "Montserrat", sans-serif;
    color: #333;
    background: #ffffff;
    font-optical-sizing: auto;
    font-weight: 400;
    height: auto; /* Пусть высота определяется содержимым */
    font-style: normal;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    /* Анимированный фон */
    background: radial-gradient(100% 100% at 4% 3%, #726ae2 0%, transparent), 
                radial-gradient(100% 100% at var(--g2-1-x-position) var(--g2-1-y-position), #40a4cc -32%, transparent), 
                radial-gradient(100% 100% at var(--g2-2-x-position) var(--g2-2-y-position), #9b5765 0%, transparent), 
                #692679;
    animation-name: g-2;
    animation-iteration-count: infinite;
    animation-duration: 10s;
    transition-timing-function: ease-in-out;

    /* Для того чтобы footer с margin-top: auto; работал, body должен быть flex-контейнером */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Минимальная высота, чтобы футер прижимался к низу, если контента мало */
}


*, *::before, *::after {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    padding: 4px 12px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(73, 73, 73, 0.137); /* Прозрачный фон для эффекта размытия */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none;
}

.header.scrolled {
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}

.header_inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header_logo {
    font-family: 'Kaushan Script', cursive;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    color: #252525;
}

/* Nav */
.nav {
    font-size: 13px;
}

.nav_link {
    display: inline-block;
    vertical-align: top;
    margin: 0 18px;
    position: relative;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.25s linear;
}

.nav_link:hover {
    color: #000000;
}

.nav_link:hover::after {
    opacity: 1; /* Если вы используете ::after для подчеркивания, убедитесь, что оно определено */
}

/* Navbar for phone (Hamburger menu) */
.nav-toggle {
    display: none; /* Скрыт по умолчанию на больших экранах */
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 10px;
    z-index: 1100; 
}

.nav-toggle__bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}


/* Intro Section */
.intro {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    
    min-height: calc(100vh - 80px); 
    cursor: default;


    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

}

.intro_inner {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
    padding-top: 120px; 
    padding-bottom: clamp(60px, 10vw, 100px); 
}

.intro_title {
    color: #252525;
    font-size: clamp(10px, 4vw, 30px);
    font-weight: 670;
    font-family: 'Inter Tight', sans-serif;
    margin-bottom: 20px;
    line-height: 1.2;
}

.intro_suptitle {
    font-size: clamp(14px, 6vw, 50px);
    color: #252525;
    margin-bottom: 30px; 
}

/* Input field for AI query */
form {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 980px;
    margin: 0 auto; /* Центрируем саму форму */
}

.input {
    flex-grow: 1; /* Поле ввода занимает всё доступное место */
    min-width: 0; /* Позволяет полю сжиматься на маленьких экранах */
    padding: 10px 15px;
    font-size: 20px;
    border-radius: 10px;
    border: none;
    background: #00000021;
    color: #252525;
    margin: 0 15px 0 0; /* Убираем все отступы, кроме правого */
    font-family: "Inter Tight", sans-serif;
    font-weight: 600;
}

.input:focus {
    outline: none;
}

.input_button {
    flex-shrink: 0; /* Кнопка не сжимается */
    background-color: #00000021;
    padding: 8px 30px;
    border-radius: 10px;
    border: none;
    color: #252525;
    font-family: "Inter Tight", sans-serif;
    font-weight: 600;
    font-size: 22px;
    transition: all 0.3s;
}

.input_button:hover {
    background-color: #0000003a;
}

/* Footer */
footer {
    background-color: rgba(73, 73, 73, 0.137);
    color: #181818;
    padding: 40px 20px;
    text-align: center;
    font-size: 14px;
    margin-top: auto; /* Прижимает футер к низу, если body - flex-column */
}

.footer_link {
    color: #181818;
    text-decoration: none;
}

.footer_link:hover {
    text-decoration: underline;
}

/* Media Queries for AI Phone Finder Specific Styles */
@media (max-width: 1024px) {
    /* Navbar for mobile */
    .nav-toggle {
        display: block; /* Show hamburger */
    }

    .nav {
        flex-direction: column;
        align-items: center;
        position: fixed; 
        top: 0;
        left: 0;
        right: 0;
        background: rgba(145, 142, 187, 0.795);
        height: auto;
        padding: 80px 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
        z-index: 1000;
        pointer-events: none;
    }

    .nav.nav--active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav_link {
        font-size: clamp(22px, 4vw, 65px);
        margin: 20px 0;
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav.nav--active .nav_link {
        opacity: 1;
        transform: translateY(0);
    }

    /* Animation for nav links */
    .nav.nav--active .nav_link:nth-child(1) { transition-delay: 0.05s; }
    .nav.nav--active .nav_link:nth-child(2) { transition-delay: 0.15s; }
    .nav.nav--active .nav_link:nth-child(3) { transition-delay: 0.25s; }
    .nav.nav--active .nav_link:nth-child(4) { transition-delay: 0.35s; }

    /* Hamburger icon animation */
    .nav-toggle {
        position: relative;
        width: 34px;
        height: 34px;
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .nav-toggle__bar {
        position: absolute;
        width: 100%;
        height: 3px;
        background: #333;
        transition: 0.3s ease;
        left: 0;
    }

    .nav-toggle__bar:nth-child(1) { top: 0; }
    .nav-toggle__bar:nth-child(2) { top: 10px; }
    .nav-toggle__bar:nth-child(3) { top: 20px; }

    .nav-toggle.open .nav-toggle__bar:nth-child(1) { transform: rotate(45deg); top: 10px; }
    .nav-toggle.open .nav-toggle__bar:nth-child(2) { opacity: 0; }
    .nav-toggle.open .nav-toggle__bar:nth-child(3) { transform: rotate(-45deg); top: 10px; }

    /* Overlay for mobile menu */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.3);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 999;
        backdrop-filter: blur(8px); 
        -webkit-backdrop-filter: blur(8px);
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Intro for mobile */
    .intro {
        min-height: 100vh; /* Используем min-height, чтобы контент мог вытолкнуть блок */
        height: auto; /* Снимаем жесткую высоту */
        padding: 60px 0 40px; 
        background-position: top;
        display: block;
        margin-bottom: 0; /* Убираем, если был */
    }

    .intro_inner {
        padding: 0px 20px;
        text-align: center;
        padding-bottom: clamp(60px, 10vw, 100px); /* Обеспечиваем достаточный отступ снизу на мобильных */
    }

    /* Input field for mobile */
 .input {
        padding: 9px 12px;
        font-size: 16px;
        margin-right: 5px;
        margin-bottom: 1px;
    }

    .input_button {
        padding: 8px 18px;
        font-size: 17px;
    }
}

