/* assets/css/pages/how-it-works.css - How It Works page styles (shared styles: assets/css/public-layout.css) */

body.dark .navbar,
body.dark .footer,
body.dark .card,
body.dark .benefit-card,
body.dark .pill-role,
body.dark .cta-box,
body.dark .sidebar-overlay,
body.dark .sidebar,
body.dark .who-card,
body.dark .step-card,
body.dark .demo-card {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark .ai-chat-input input::placeholder {
    color: #94a3b8 !important;
}

body.dark .step-card .step-number {
    background: #2d3a52 !important;
    color: #7aa9ff !important;
    border-color: #334155 !important;
}

body.dark .step-card .step-icon {
    color: #7aa9ff !important;
}

body.dark .role-tab button {
    color: #94a3b8 !important;
}

body.dark .role-tab button:hover {
    color: #7aa9ff !important;
    background: #2d3a52 !important;
}

body.dark .role-tab button.active {
    color: #7aa9ff !important;
    background: #2d3a52 !important;
    border-color: #7aa9ff !important;
}

body.dark .demo-card .video-container {
    background: #0f172a !important;
    border-color: #334155 !important;
}

.btn-sm {
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
}

body.dark .btn-outline {
    border-color: #475569;
    color: #e2e8f0;
}

body.dark .btn-outline:hover {
    background: #2d3a52;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
    padding: 30px 0 20px;
    background: #f6f9fc;
    border-bottom: 1px solid rgba(13, 110, 253, 0.08);
    transition: background 0.3s;
}

body.dark .page-header {
    background: #0f172a;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header p {
    font-size: 1.05rem;
    color: #4a5c72;
}

body.dark .page-header p {
    color: #94a3b8;
}

.page-header .breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 0.9rem;
    color: #4a5c72;
    margin-top: 6px;
}

body.dark .page-header .breadcrumb {
    color: #94a3b8;
}

.page-header .breadcrumb a {
    color: #0d6efd;
}

.page-header .breadcrumb a:hover {
    text-decoration: underline;
}

/* ============================================================
   ROLE TABS
   ============================================================ */

.role-tabs-section {
    padding: 20px 0 30px;
}

.role-tab {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    border-bottom: 2px solid rgba(13, 110, 253, 0.06);
    padding-bottom: 10px;
}

.role-tab button {
    padding: 10px 28px;
    border: none;
    background: none;
    font-weight: 600;
    font-size: 1rem;
    color: #4a5c72;
    cursor: pointer;
    border-radius: 40px;
    transition: all 0.2s;
}

.role-tab button:hover {
    color: #0d6efd;
    background: #edf4fe;
}

.role-tab button.active {
    color: #0d6efd;
    background: #edf4fe;
}

.role-tab button i {
    margin-right: 8px;
}

/* ============================================================
   STEPS SECTION
   ============================================================ */

.steps-section {
    padding: 10px 0 40px;
}

.steps-container {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.steps-container.active {
    display: block;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 10px;
}

.step-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(13, 110, 253, 0.06);
    padding: 28px 20px;
    text-align: center;
    transition: all 0.25s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.step-card .step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #edf4fe;
    color: #0d6efd;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 2px solid #dbeafe;
}

.step-card .step-icon {
    font-size: 2.2rem;
    color: #0d6efd;
    margin-bottom: 10px;
}

.step-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-card p {
    font-size: 0.9rem;
    color: #4a5c72;
    margin-bottom: 0;
}

body.dark .step-card p {
    color: #94a3b8;
}

/* Step connector lines */

.steps-grid .step-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -12px;
    width: 24px;
    height: 2px;
    background: #dbeafe;
    transform: translateY(-50%);
}

body.dark .steps-grid .step-card:not(:last-child)::after {
    background: #334155;
}

/* ============================================================
   VIDEO / DEMO SECTION - WITH REAL EMBED
   ============================================================ */

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

.demo-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(13, 110, 253, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    padding: 32px;
    text-align: center;
    transition: background 0.3s, border-color 0.3s;
}

body.dark .demo-card {
    background: #1e293b;
    border-color: #334155;
}

.demo-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.demo-card p {
    color: #4a5c72;
    margin-bottom: 20px;
}

body.dark .demo-card p {
    color: #94a3b8;
}

.demo-card .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
    border: 1px solid #e2e8f0;
}

.demo-card .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 992px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .steps-grid .step-card:not(:last-child)::after {
        display: none;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 30px;
    }
    .floating-actions {
        bottom: 20px;
        right: 20px;
        gap: 8px;
    }
    .floating-btn,
    .ai-chat-toggle {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    .phone-popup {
        right: 55px;
        min-width: 180px;
    }
    .lang-popup {
        right: 55px;
        min-width: 130px;
    }
    .ai-chat-widget {
        width: 340px;
        height: 460px;
        right: 80px;
        bottom: 20px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-actions .btn {
        display: none;
    }
    .nav-toggle {
        display: block;
    }
    .navbar .container {
        flex-wrap: wrap;
    }
    .nav-actions {
        margin-left: auto;
    }
    .page-header h1 {
        font-size: 1.8rem;
    }
    .page-header p {
        font-size: 1rem;
    }
    .role-tab button {
        font-size: 0.85rem;
        padding: 8px 18px;
    }
    .steps-grid {
        grid-template-columns: 1fr 1fr;
    }
    .steps-grid .step-card:not(:last-child)::after {
        display: none;
    }
    .demo-card {
        padding: 20px;
    }
    .demo-card .video-container {
        border-radius: 12px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .sidebar {
        width: 280px;
        left: -300px;
    }
    .floating-actions {
        bottom: 16px;
        right: 16px;
        gap: 6px;
    }
    .floating-btn,
    .ai-chat-toggle {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }
    .floating-btn .tooltip,
    .ai-chat-toggle .tooltip {
        display: none;
    }
    .phone-popup {
        right: 48px;
        min-width: 160px;
        bottom: 0;
    }
    .phone-popup .phone-item {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    .lang-popup {
        right: 48px;
        min-width: 120px;
        bottom: 0;
    }
    .lang-popup .lang-item {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    .ai-chat-widget {
        width: 300px;
        height: 420px;
        right: 70px;
        bottom: 16px;
    }
    .ai-chat-messages {
        padding: 10px 14px;
        gap: 8px;
    }
    .ai-chat-messages .message {
        font-size: 0.8rem;
        padding: 7px 12px;
    }
    .ai-chat-header {
        padding: 10px 14px;
        min-height: 50px;
    }
    .ai-chat-header .avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    .ai-chat-header .header-info h4 {
        font-size: 0.8rem;
    }
    .ai-chat-input {
        padding: 8px 12px 12px;
        gap: 6px;
    }
    .ai-chat-input input {
        font-size: 0.8rem;
        padding: 6px 12px;
        min-height: 34px;
    }
    .ai-chat-input button {
        font-size: 0.8rem;
        padding: 6px 14px;
        min-height: 34px;
    }
    .quick-replies {
        padding: 0 12px 6px;
    }
    .quick-replies button {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }
    .role-tab {
        flex-direction: column;
        align-items: stretch;
    }
    .role-tab button {
        width: 100%;
        text-align: center;
    }
    .demo-card {
        padding: 16px;
    }
    .demo-card h3 {
        font-size: 1.1rem;
    }
    .floating-btn,
    .ai-chat-toggle {
        width: 34px;
        height: 34px;
        font-size: 0.75rem;
    }
    .floating-actions {
        bottom: 12px;
        right: 12px;
        gap: 5px;
    }
    .phone-popup {
        right: 42px;
        min-width: 140px;
        bottom: 0;
        padding: 8px 0;
        border-radius: 12px;
    }
    .phone-popup .phone-item {
        padding: 6px 12px;
        font-size: 0.7rem;
        gap: 8px;
    }
    .phone-popup .phone-item i {
        width: 16px;
        font-size: 0.8rem;
    }
    .lang-popup {
        right: 42px;
        min-width: 100px;
        bottom: 0;
        padding: 6px 0;
        border-radius: 12px;
    }
    .lang-popup .lang-item {
        padding: 6px 12px;
        font-size: 0.7rem;
        gap: 6px;
    }
    .ai-chat-widget {
        width: 280px;
        height: 380px;
        right: 60px;
        bottom: 12px;
        border-radius: 16px;
    }
    .ai-chat-messages {
        padding: 10px 12px;
        gap: 8px;
    }
    .ai-chat-messages .message {
        font-size: 0.75rem;
        padding: 6px 10px;
        max-width: 90%;
    }
    .ai-chat-header {
        padding: 8px 12px;
        min-height: 44px;
    }
    .ai-chat-header .avatar {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
    .ai-chat-header .header-info h4 {
        font-size: 0.75rem;
    }
    .ai-chat-header .header-info p {
        font-size: 0.6rem;
    }
    .ai-chat-input {
        padding: 6px 10px 10px;
        gap: 5px;
    }
    .ai-chat-input input {
        font-size: 0.75rem;
        padding: 5px 10px;
        min-height: 30px;
    }
    .ai-chat-input button {
        font-size: 0.75rem;
        padding: 5px 12px;
        min-height: 30px;
    }
    .quick-replies {
        padding: 0 10px 4px;
        gap: 4px;
    }
    .quick-replies button {
        font-size: 0.6rem;
        padding: 2px 8px;
    }
}

@media (max-width: 400px) {
    .phone-popup {
        right: 38px;
        min-width: 120px;
    }
    .phone-popup .phone-item {
        font-size: 0.65rem;
        padding: 5px 10px;
    }
    .lang-popup {
        right: 38px;
        min-width: 90px;
    }
    .lang-popup .lang-item {
        font-size: 0.65rem;
        padding: 5px 10px;
    }
    .ai-chat-widget {
        width: 250px;
        height: 340px;
        right: 52px;
    }
    .ai-chat-messages {
        padding: 8px 10px;
    }
    .ai-chat-messages .message {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
    .ai-chat-input input {
        font-size: 0.7rem;
        padding: 4px 8px;
        min-height: 26px;
    }
    .ai-chat-input button {
        font-size: 0.7rem;
        padding: 4px 10px;
        min-height: 26px;
    }
}
