/* ==========================================================
   4. COMPONENTS (components.css)
   ========================================================== */

/* ----------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-btn);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: none;
    min-height: 48px;
    /* Touch target size */
}

.gradient-btn {
    background: linear-gradient(135deg, var(--sky-blue), var(--teal));
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-btn);
    padding: 0.9rem 2rem;
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(14, 165, 233, 0.4);
}

.gradient-btn:active,
.btn:active {
    transform: scale(0.96);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Shimmer Effect */
.gradient-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle closest-side, rgba(255, 255, 255, 0.4), transparent);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width 0.3s ease, height 0.3s ease;
}

.gradient-btn:hover::after {
    width: 250px;
    height: 250px;
}

/* Button Variants */
.gradient-btn.full-width {
    display: flex;
    width: 100%;
}

.gradient-btn.large {
    display: flex;
    /* Changed from block for centering if needed */
    width: auto;
    min-width: 180px;
    font-size: 1.1rem;
}

.btn-primary.gradient-btn {
    /* Used in dashboard actions */
    padding: 0.75rem 1.5rem;
    border-radius: 0.65rem;
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.25);
}

.btn-secondary {
    background: #fff;
    color: var(--sky-blue);
    border: 2px solid var(--sky-blue);
    border-radius: var(--border-radius-btn);
    padding: 0.9rem 1.8rem;
    font-weight: 600;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.btn-secondary:hover {
    background: var(--sky-blue);
    color: #fff;
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
}

.btn-premium {
    background: transparent;
    border: 2px solid var(--teal);
    color: var(--teal);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
}

.btn-premium:hover {
    background: linear-gradient(to right, var(--sky-blue), var(--teal));
    color: #fff;
}

.floating-demo-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(to right, var(--sky-blue), var(--teal));
    color: #fff;
    font-weight: 700;
    padding: 1rem 1.8rem;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.35);
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 1000;
    /* Increased z-index */
    animation: pulseGlow 3s infinite;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.floating-demo-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.45);
}

/* Hero Button Group */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2.5rem;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-buttons .btn.large {
    margin-top: 0;
    /* Reset margin */
    flex: 1;
    max-width: 220px;
    /* Prevent overly wide buttons on desktop */
}

/* ----------------------------------------------------------
   CARDS
   ---------------------------------------------------------- */
.card {
    /* Generic Dashboard Card */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: clamp(1rem, 5%, 2.5rem);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(14, 165, 233, 0.1);
    margin-bottom: 2rem;

    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    max-width: min(92%, 1200px);

    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.12);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

/* Feature Card (Landing) */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 var(--container-padding);
}

@media (max-width: 768px) {
    .features-section {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04);
    /* Softer, modern shadow */
    border: 1px solid rgba(14, 165, 233, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;

    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    max-width: min(92%, 1200px);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.feature-card p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.12);
    width: 100%;
    max-width: 650px;
    position: relative;
    z-index: 2;
    animation: fadeSlideUp 1.2s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

/* Login specific max-width override via CSS specificity or separate rule */


/* ----------------------------------------------------------
   BUBBLES
   ---------------------------------------------------------- */
.service-bubbles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 3rem auto;
    width: 100%;
    max-width: 1000px;
    padding: 0 var(--container-padding);
}

.bubble {
    position: relative;
    width: 160px;
    /* Reduced specific width for better fit */
    height: 160px;
    border-radius: 40px;
    /* Modern squircle-ish */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    background: linear-gradient(145deg, var(--sky-blue), var(--teal));
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bubble:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(14, 165, 233, 0.3);
}

.bubble img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.bubble::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(14, 165, 233, 0.2) 100%);
    transition: all 0.3s ease;
}

.bubble:hover img {
    opacity: 0.65;
}

.bubble:hover::after {
    background: rgba(0, 0, 0, 0.35);
}

.bubble span {
    position: relative;
    z-index: 2;
    font-size: 1.05rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.bubble-small {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.15), rgba(20, 184, 166, 0.15));
    color: var(--text-dark);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.15);
    margin: 0.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bubble-small:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.25);
}

.logo-dot {
    width: 12px;
    height: 12px;
    background: var(--white);
    border-radius: 50%;
    animation: pulse 2.5s infinite ease-in-out;
}

/* ----------------------------------------------------------
   FORMS
   ---------------------------------------------------------- */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem 2rem;
}

.input-group.full {
    grid-column: 1 / -1;
}

.input-group label,
.find-form label,
.form-field span {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.5rem;
}

.input-group input,
.input-group select,
.input-group textarea,
.find-form input,
.find-form select,
.form-field input {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    font-family: "Poppins", system-ui, sans-serif;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(14, 165, 233, 0.15);
    border-radius: 0.65rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus,
.find-form input:focus,
.find-form select:focus,
.form-field input:focus {
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.input-group input::placeholder,
.input-group textarea::placeholder,
.find-form input::placeholder {
    color: #94a3b8;
}

/* Custom Select Arrow */
.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%230ea5e9' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px 8px;
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Search Form (Find a Pro) */
.find-form form {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    padding: 2rem 2.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.15);
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

/* ----------------------------------------------------------
   LINKS & MISC
   ---------------------------------------------------------- */
.signup-link {
    background: var(--white);
    color: var(--sky-blue);
    border-radius: 0.6rem;
    padding: 0.5rem 1rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    transition: transform 0.2s, opacity 0.2s;
}

.signup-link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.signup-link-text {
    color: var(--sky-blue);
    font-weight: 600;
    text-decoration: none;
}

.signup-link-text:hover {
    text-decoration: underline;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(14, 165, 233, 0.2);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    background: #e0f7ff;
    border-left: 4px solid #0ea5e9;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Glass Card Utility (Wow Effect) */
.wow-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: 0 8px 32px 0 rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.wow-card:hover {
    box-shadow: 0 12px 40px 0 rgba(14, 165, 233, 0.25);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .wow-card {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
        background: rgba(255, 255, 255, 0.5);
        /* Slightly more transparent on mobile */
    }

    .service-bubbles {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .bubble {
        width: 100%;
        /* Fill the grid cell */
        height: auto;
        aspect-ratio: 1;
        /* Keep proper shape */
        border-radius: 20px;
        font-size: 1rem;
    }

    .bubble span {
        font-size: 0.95rem;
    }

    .card,
    .feature-card {
        padding: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn.large {
        width: 100%;
        max-width: none;
    }
}