/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --bg-dark: #09090B;
    --bg-card: #18181B;
    --bg-card-hover: #27272A;
    --text-white: #FFFFFF;
    --text-grey: #A1A1AA;
    --text-light-grey: #D4D4D8;
    --green-brand: #22C55E;
    --green-whatsapp: #25D366;
    --border-color: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Icons styling */
.icon {
    display: inline-block;
    vertical-align: middle;
}

/* Button Styles */
button, .btn-primary, .btn-outline {
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--green-brand);
    color: #000000;
    border: none;
    padding: 12px 28px;
}

.btn-primary:hover {
    background-color: #4ade80;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.btn-outline {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    border: 1px solid var(--border-color);
    padding: 12px 28px;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background-color: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background-color: var(--green-brand);
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.55rem;
    font-family: 'Outfit', sans-serif;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    padding-top: 140px;
    padding-bottom: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 8%;
    padding-right: 8%;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--text-light-grey);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--green-brand);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--green-brand);
}

.hero-title {
    font-size: 3.8rem;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.text-white {
    color: var(--text-white);
}

.text-green {
    color: var(--green-brand);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-grey);
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Specialty Cards */
.specialty-container {
    position: absolute;
    bottom: 40px;
    left: 8%;
    right: 8%;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.specialty-card {
    height: 120px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.specialty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 9, 11, 0.4);
    transition: all 0.3s ease;
    z-index: 1;
}

.specialty-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.specialty-card:hover::before {
    background-color: rgba(9, 9, 11, 0.2);
}

.specialty-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 2;
}

.specialty-info h3 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.specialty-info p {
    font-size: 0.9rem;
    color: var(--text-grey);
}

/* Steps Section */
.steps-section {
    padding: 100px 8%;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.01em;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.step-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    transition: all 0.3s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    background-color: var(--bg-card-hover);
}

.step-icon-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--green-brand);
    margin-bottom: 30px;
}

.step-icon {
    opacity: 0.9;
}

.step-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.08);
}

.step-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.step-card p {
    color: var(--text-grey);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Trust Section */
.trust-section {
    padding: 100px 8%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    background-color: #060608;
    border-bottom: 1px solid var(--border-color);
}

.trust-content {
    max-width: 500px;
}

.trust-title {
    font-size: 2.8rem;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.trust-text {
    font-size: 1.05rem;
    color: var(--text-grey);
    line-height: 1.7;
    margin-bottom: 40px;
}

.trust-points {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.trust-point-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.trust-point-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.04);
}

.trust-point-icon {
    color: var(--green-brand);
    background-color: rgba(34, 197, 94, 0.08);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trust-point-card h4 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.trust-point-card p {
    color: var(--text-grey);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    padding: 40px 8%;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.footer-copyright {
    color: var(--text-grey);
    font-size: 0.9rem;
}

/* WhatsApp Chat Drawer (Tito IA Simulator) */
.chat-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    height: 100%;
    background-color: #0E161C; /* Dark WhatsApp theme */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-drawer.open {
    transform: translateX(0);
}

.chat-header {
    background-color: #1F2C34; /* WhatsApp header */
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--green-brand);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    font-family: 'Outfit', sans-serif;
}

.chat-profile-info h4 {
    font-size: 1.05rem;
    color: var(--text-white);
}

.chat-profile-info .status {
    font-size: 0.75rem;
    color: #00A884; /* WhatsApp online green */
    font-weight: 500;
}

.close-chat-btn {
    background: none;
    border: none;
    color: var(--text-grey);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.close-chat-btn:hover {
    color: var(--text-white);
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #0B141A; /* WhatsApp body chat area */
    background-image: radial-gradient(rgba(255,255,255,0.015) 1px, transparent 0);
    background-size: 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Messages Bubbles */
.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.message.tito {
    background-color: #202C33; /* Dark WhatsApp incoming bubble */
    color: var(--text-white);
    align-self: flex-start;
    border-top-left-radius: 0;
}

.message.user {
    background-color: #005C4B; /* Dark WhatsApp outgoing bubble */
    color: var(--text-white);
    align-self: flex-end;
    border-top-right-radius: 0;
}

.message-time {
    display: block;
    text-align: right;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

.chat-footer {
    background-color: #1F2C34;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-wrapper input {
    flex: 1;
    background-color: #2A3942;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.chat-input-wrapper input:focus {
    outline: none;
}

.send-btn {
    background-color: #00A884;
    color: #FFF;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.send-btn:hover {
    background-color: #008F6F;
}

.send-btn:disabled {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
}

/* Simulator Controls Panel */
.simulator-controls {
    display: flex;
    gap: 10px;
}

.sim-btn {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sim-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Technician Card in Chat */
.tech-card-bubble {
    background-color: #2A3942;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    margin-top: 5px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.tech-card-avatar {
    width: 44px;
    height: 44px;
    background-color: var(--green-brand);
    color: #000;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-card-info h5 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.tech-card-info p {
    font-size: 0.78rem;
    color: var(--text-grey);
}

/* Media Queries */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.2rem;
    }
    
    .specialty-container {
        grid-template-columns: 1fr;
        position: relative;
        bottom: 0;
        left: 0;
        right: 0;
        margin-top: 50px;
        gap: 12px;
    }
    
    .specialty-card {
        height: 90px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-section {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 5%;
    }

    /* En celular: ocultamos "Chatea con Tito" del navbar (el hero ya tiene su botón)
       y dejamos solo el logo + "Únete como Maestro" para que quepan sin cortarse. */
    .navbar .btn-outline.open-chat-btn {
        display: none;
    }
    .navbar .logo-icon {
        width: 34px;
        height: 34px;
        font-size: 1.25rem;
    }
    .navbar .logo-text {
        font-size: 1.4rem;
    }
    .navbar .btn-primary {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .hero-section {
        padding-left: 5%;
        padding-right: 5%;
        padding-top: 110px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .steps-section {
        padding: 60px 5%;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .trust-section {
        padding: 60px 5%;
    }
    
    .trust-title {
        font-size: 2rem;
    }
    
    .chat-drawer {
        width: 100%;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 9, 11, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    backdrop-filter: blur(10px);
}
.modal.open {
    display: flex;
}
.modal-content {
    max-width: 600px;
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}
.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}
.close-modal {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s;
}
.close-modal:hover {
    color: #fff;
}
.modal-body {
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}
.form-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    font-weight: 500;
}
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
    border-color: #22c55e;
}
.form-group select option {
    background: #171c22;
    color: #fff;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    border-radius: 8px;
}
.checkbox-grid label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.checkbox-grid input[type="checkbox"] {
    accent-color: #22c55e;
}
.form-group input[type="file"] {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}
.form-group input[type="file"]::-webkit-file-upload-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.2s;
}
.form-group input[type="file"]::-webkit-file-upload-button:hover {
    background: rgba(255, 255, 255, 0.2);
}
.w-full {
    width: 100%;
}
.success-alert {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}
.success-alert h4 {
    color: #22c55e;
    margin: 0 0 10px 0;
}
.success-alert p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .checkbox-grid {
        grid-template-columns: 1fr 1fr;
    }
}
