/**
 * Medpro.app Lead Capture Page Styles
 * Standalone Mobile-First Design
 */

/* ============================================
   CSS Variables - Medpro.app Brand Colors
   ============================================ */
:root {
    --primary: #274c77;
    --primary-dark: #1a3a5c;
    --accent: #6096ba;
    --accent-light: #a3cef1;
    --secondary: #e7ecef;
    --highlight: #f5cb5c;
    --gray: #8b8c89;
    --white: #ffffff;
    --success: #28a745;
    --error: #dc3545;
}

/* ============================================
   Base Styles (Mobile First - 320px+)
   ============================================ */
* {
    box-sizing: border-box;
}

body.leads-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--secondary);
}

/* Page Wrapper */
.leads-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.leads-page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Hero Section (Mobile)
   ============================================ */
.leads-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 40px 15px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.leads-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0 auto;
}

/* Hero Logo */
.hero-logo-link {
    display: inline-block;
    margin-bottom: 20px;
}

.hero-logo {
    height: 50px;
    transition: transform 0.3s ease;
}

.hero-logo-link:hover .hero-logo {
    transform: scale(1.05);
}

/* Hero Title - Poppins Font */
.hero-title {
    font-family: 'Poppins', sans-serif;
    color: var(--white);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
    font-weight: 400;
}

/* ============================================
   Form Section (Mobile)
   ============================================ */
.leads-form-section {
    padding: 0 15px 40px;
    background: var(--secondary);
    flex: 1;
}

/* Form Card */
.form-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(39, 76, 119, 0.15);
    overflow: hidden;
    margin-top: -25px;
    position: relative;
    z-index: 10;
}

.form-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 20px 15px;
    text-align: center;
    color: var(--white);
}

.form-card-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.form-card-header p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Form Content */
#lead-capture-form {
    padding: 20px 15px;
}

/* Form Sections */
.form-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--secondary);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 15px;
    padding-bottom: 0;
}

.section-title {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.section-title i {
    color: var(--accent);
    font-size: 1rem;
}

.optional-badge {
    background: var(--secondary);
    color: var(--gray);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* Form Labels */
.form-label {
    font-weight: 500;
    color: var(--primary);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.required {
    color: var(--error);
}

/* Form Controls */
.form-control,
.form-select {
    border: 2px solid var(--secondary);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(96, 150, 186, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #adb5bd;
}

textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

/* Contact Hint */
.contact-hint {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 8px;
    margin-bottom: 0;
}

.contact-hint i {
    color: var(--accent);
    margin-right: 4px;
}

/* Form Actions */
.form-actions {
    padding-top: 5px;
}

.btn-submit {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border: none;
    color: var(--white);
    transition: all 0.3s ease;
    cursor: pointer;
    touch-action: manipulation;
}

.btn-submit:hover,
.btn-submit:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(39, 76, 119, 0.25);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form Error Message */
.form-error-message {
    background: #fff5f5;
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 12px;
    color: var(--error);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
}

.form-error-message i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Success Message */
.success-message {
    padding: 40px 20px;
    text-align: center;
}

.success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--success) 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease-out;
}

.success-icon i {
    font-size: 35px;
    color: var(--white);
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.success-message p {
    color: var(--gray);
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.success-message .btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 8px;
}

.success-message .btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    font-size: 0.8rem;
}

.trust-item i {
    color: var(--accent);
    font-size: 1rem;
}

/* ============================================
   Standalone Footer (Mobile)
   ============================================ */
.standalone-footer {
    background: var(--primary);
    padding: 30px 15px;
    text-align: center;
    margin-top: auto;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.standalone-footer .social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.standalone-footer .social-link:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--white);
}

.footer-contact i {
    font-size: 1rem;
}

.footer-website {
    margin-bottom: 15px;
}

.footer-website a {
    color: var(--accent-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-website a:hover {
    color: var(--white);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin: 0;
}

/* ============================================
   Validation States
   ============================================ */
.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--success);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--error);
}

.invalid-feedback {
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 4px;
}

/* ============================================
   Page Loader Styles
   ============================================ */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    height: 50px;
    margin-bottom: 15px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loader-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.loader-dot {
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(1) { animation-delay: 0s; }
.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
}

/* ============================================
   Tablet Styles (min-width: 576px)
   ============================================ */
@media (min-width: 576px) {
    .leads-hero {
        padding: 50px 20px 60px;
    }

    .hero-logo {
        height: 55px;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .leads-form-section {
        padding: 0 20px 50px;
    }

    .form-card {
        margin-top: -30px;
        border-radius: 14px;
    }

    .form-card-header {
        padding: 25px 20px;
    }

    .form-card-header h2 {
        font-size: 1.4rem;
    }

    #lead-capture-form {
        padding: 25px 20px;
    }

    .section-title {
        font-size: 0.95rem;
    }

    .optional-badge {
        font-size: 0.7rem;
    }

    .standalone-footer {
        padding: 35px 20px;
    }

    .standalone-footer .social-link {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .footer-contact {
        flex-direction: row;
        justify-content: center;
        gap: 25px;
    }
}

/* ============================================
   Tablet/Small Desktop (min-width: 768px)
   ============================================ */
@media (min-width: 768px) {
    .leads-hero {
        padding: 60px 0 70px;
    }

    .hero-content {
        max-width: 600px;
    }

    .hero-logo {
        height: 60px;
        margin-bottom: 25px;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .leads-form-section {
        padding: 0 0 60px;
    }

    .form-card {
        margin-top: -40px;
    }

    .form-card-header {
        padding: 30px;
    }

    .form-card-header h2 {
        font-size: 1.6rem;
        margin-bottom: 0.4rem;
    }

    .form-card-header p {
        font-size: 0.95rem;
    }

    #lead-capture-form {
        padding: 30px;
    }

    .form-section {
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .section-title {
        font-size: 1rem;
        margin-bottom: 18px;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .form-control,
    .form-select {
        padding: 12px 14px;
    }

    textarea.form-control {
        min-height: 70px;
    }

    .btn-submit {
        padding: 14px 24px;
        font-size: 1.05rem;
    }

    .trust-indicators {
        gap: 25px;
        margin-top: 25px;
    }

    .trust-item {
        font-size: 0.85rem;
    }

    .success-icon {
        width: 75px;
        height: 75px;
    }

    .success-icon i {
        font-size: 38px;
    }

    .success-message h3 {
        font-size: 1.6rem;
    }

    /* Footer Desktop */
    .standalone-footer {
        padding: 40px 0;
    }

    .standalone-footer .social-link {
        width: 46px;
        height: 46px;
    }

    .standalone-footer .social-link:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
    }

    .footer-contact a {
        font-size: 0.95rem;
    }

    .footer-copyright {
        font-size: 0.85rem;
    }
}

/* ============================================
   Desktop (min-width: 992px)
   ============================================ */
@media (min-width: 992px) {
    .leads-hero {
        padding: 70px 0 80px;
    }

    .hero-content {
        max-width: 650px;
    }

    .hero-logo {
        height: 65px;
        margin-bottom: 30px;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-subtitle {
        font-size: 1.15rem;
    }

    .leads-form-section {
        padding: 0 0 70px;
    }

    .form-card {
        margin-top: -50px;
        border-radius: 16px;
    }

    #lead-capture-form {
        padding: 35px;
    }

    .form-control,
    .form-select {
        padding: 12px 16px;
    }

    .btn-submit {
        font-size: 1.1rem;
    }

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(39, 76, 119, 0.3);
    }

    .trust-indicators {
        gap: 30px;
        margin-top: 30px;
    }

    .trust-item {
        font-size: 0.9rem;
    }

    .standalone-footer {
        padding: 45px 0;
    }

    .footer-social {
        gap: 15px;
        margin-bottom: 25px;
    }

    .standalone-footer .social-link {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
    }

    .standalone-footer .social-link:hover {
        transform: translateY(-3px);
    }

    .loader-logo {
        height: 60px;
        margin-bottom: 20px;
    }

    .loader-dots {
        gap: 8px;
    }

    .loader-dot {
        width: 10px;
        height: 10px;
    }
}

/* ============================================
   Large Desktop (min-width: 1200px)
   ============================================ */
@media (min-width: 1200px) {
    .leads-hero {
        padding: 80px 0 90px;
    }

    .hero-content {
        max-width: 700px;
    }

    .hero-logo {
        height: 70px;
    }

    .hero-title {
        font-size: 3rem;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .form-card {
        margin-top: -60px;
    }

    .form-card-header {
        padding: 35px;
    }

    .form-card-header h2 {
        font-size: 1.75rem;
    }

    .form-card-header p {
        font-size: 1rem;
    }

    .success-message {
        padding: 60px 30px;
    }

    .success-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 25px;
    }

    .success-icon i {
        font-size: 40px;
    }

    .success-message h3 {
        font-size: 1.75rem;
        margin-bottom: 10px;
    }

    .success-message p {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }

    .standalone-footer {
        padding: 50px 0;
    }
}
