/* ============================================
   ATECHLO - SOLUCIONES DIGITALES
   Showcase de sitios web y apps móviles
   ============================================ */

/* --- HERO --- */
.digital-hero {
    padding: 70px 20px 50px;
    text-align: center;
    background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.digital-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--dark-blue);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 15px;
}

.digital-hero h1 span {
    color: var(--primary-blue);
}

.digital-hero p {
    font-size: 1rem;
    color: #64748b;
    max-width: 640px;
    margin: 0 auto 30px;
}

/* --- FILTROS --- */
.digital-filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.digital-filter-btn {
    background: transparent;
    border: 1px solid #dbe3ee;
    color: #64748b;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.digital-filter-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.digital-filter-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #ffffff;
}

/* --- SECCIONES --- */
.digital-section {
    padding: 60px 0;
    scroll-margin-top: 100px;
}

.digital-section:nth-child(even) {
    background: #f8fafc;
}

.digital-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.digital-section-header h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--dark-blue);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.digital-section-header h2 span {
    color: var(--primary-blue);
}

.digital-section-header p {
    font-size: 0.95rem;
    color: #64748b;
    max-width: 560px;
    margin: 0 auto;
}

/* --- GRID DE DEMOS --- */
.digital-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.demo-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef2f7;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
}

.demo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 51, 102, 0.12);
    border-color: var(--primary-blue);
}

.demo-media {
    padding: 20px 20px 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    border-bottom: 1px solid #eef2f7;
}

.demo-media.web {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demo-media.app {
    display: flex;
    justify-content: center;
    gap: 14px;
    align-items: flex-end;
}

.demo-info {
    padding: 20px 24px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.demo-title {
    font-size: 1.1rem;
    color: var(--dark-blue);
    font-weight: 700;
    margin-bottom: 6px;
}

.demo-badge {
    align-self: center;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 20px;
    background: #f0f9ff;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.demo-badge.app-badge {
    background: #f3f0ff;
    color: #7c3aed;
}

.demo-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.demo-btn {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-blue);
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.demo-btn:hover {
    background: #004d99;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3);
}

/* ============================================
   FRAMES (navegador y teléfono)
   ============================================ */
.browser-frame {
    font-size: 8px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.08);
    width: 100%;
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.6em 0.8em;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.b-dot {
    width: 0.7em;
    height: 0.7em;
    border-radius: 50%;
    flex-shrink: 0;
}

.b-dot.red { background: #ff5f57; }
.b-dot.yellow { background: #febc2e; }
.b-dot.green { background: #28c840; }

.b-url {
    margin: 0 auto;
    font-size: 0.9em;
    color: #94a3b8;
    background: #ffffff;
    padding: 0.25em 1.2em;
    border-radius: 4px;
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.browser-screen {
    padding: 0.9em;
}

.phone-frame {
    font-size: 10px;
    width: 11.5em;
    border-radius: 1.4em;
    border: 0.3em solid #1e293b;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.15);
    flex-shrink: 0;
}

.phone-notch {
    height: 0.7em;
    margin: 0.4em auto 0;
    width: 50%;
    background: #1e293b;
    border-radius: 0.4em;
}

.phone-screen {
    padding: 0.7em;
}

/* ============================================
   MOCK PRIMITIVES (mini-UI)
   ============================================ */
.mock-navbar {
    display: flex;
    align-items: center;
    gap: 0.8em;
    padding: 0.5em 0.6em;
    border-bottom: 0.15em solid #eef2f7;
    margin-bottom: 0.8em;
}

.mock-logo {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-weight: 800;
    color: var(--dark-blue);
    font-size: 1em;
}

.mock-logo-dot {
    width: 0.9em;
    height: 0.9em;
    border-radius: 50%;
    background: var(--demo-accent);
}

.mock-links {
    display: flex;
    gap: 0.8em;
    margin-left: auto;
}

.mock-link {
    width: 2.6em;
    height: 0.55em;
    border-radius: 0.3em;
    background: #e2e8f0;
}

.mock-link.cta {
    background: var(--demo-accent);
    width: 3.4em;
}

.mock-hero {
    text-align: center;
    padding: 1.2em 0.6em;
    background: var(--demo-accent-soft);
    border-radius: 0.6em;
    margin-bottom: 0.9em;
}

.mock-hero.bg {
    background-size: cover;
    background-position: center;
    position: relative;
    color: #ffffff;
}

.mock-hero.bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.65) 100%);
    border-radius: 0.6em;
}

.mock-hero.bg > * {
    position: relative;
    z-index: 1;
}

.mock-hero-title {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--demo-accent);
    line-height: 1.1;
    margin-bottom: 0.5em;
}

.mock-hero.bg .mock-hero-title {
    color: #ffffff;
}

.mock-hero-sub {
    font-size: 0.95em;
    color: #64748b;
    margin: 0 auto 0.6em;
    width: 80%;
    height: 0.5em;
    background: #e2e8f0;
    border-radius: 0.25em;
}

.mock-hero.bg .mock-hero-sub {
    background: rgba(255, 255, 255, 0.55);
}

.mock-hero-sub.short { width: 60%; }

.mock-btn {
    display: inline-block;
    background: var(--demo-accent);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95em;
    padding: 0.5em 1.4em;
    border-radius: 0.5em;
    border: none;
}

.mock-btn.ghost {
    background: transparent;
    color: var(--demo-accent);
    border: 0.15em solid var(--demo-accent);
}

.mock-search {
    display: flex;
    align-items: center;
    gap: 0.5em;
    background: #ffffff;
    border: 0.15em solid #e2e8f0;
    border-radius: 2em;
    padding: 0.45em 1em;
    margin: 0.8em auto 0;
    width: 85%;
}

.mock-search-icon {
    width: 0.8em;
    height: 0.8em;
    border-radius: 50%;
    border: 0.18em solid #94a3b8;
    position: relative;
    flex-shrink: 0;
}

.mock-search-icon::after {
    content: '';
    position: absolute;
    right: -0.3em;
    bottom: -0.25em;
    width: 0.35em;
    height: 0.18em;
    background: #94a3b8;
    transform: rotate(45deg);
}

.mock-search-text {
    height: 0.45em;
    width: 70%;
    background: #e2e8f0;
    border-radius: 0.25em;
}

.mock-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7em;
}

.mock-cards.two {
    grid-template-columns: repeat(2, 1fr);
}

.mock-card {
    background: #ffffff;
    border: 0.15em solid #eef2f7;
    border-radius: 0.6em;
    padding: 0.6em;
    text-align: center;
}

.mock-img {
    width: 100%;
    height: 4.5em;
    border-radius: 0.4em;
    background: linear-gradient(135deg, #eef4fb, #e2ecf7);
    margin-bottom: 0.5em;
    overflow: hidden;
    position: relative;
}

.mock-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mock-img.tall { height: 7em; }

.mock-line {
    height: 0.5em;
    background: #e2e8f0;
    border-radius: 0.25em;
    margin: 0 auto 0.35em;
}

.mock-line.w70 { width: 70%; }
.mock-line.w50 { width: 50%; }

.mock-price {
    font-size: 0.95em;
    font-weight: 800;
    color: var(--demo-accent);
}

/* Listas (apps) */
.mock-list {
    display: flex;
    flex-direction: column;
    gap: 0.55em;
}

.mock-list-item {
    display: flex;
    align-items: center;
    gap: 0.6em;
    background: #ffffff;
    border: 0.15em solid #eef2f7;
    border-radius: 0.6em;
    padding: 0.55em 0.6em;
}

.mock-avatar {
    width: 2em;
    height: 2em;
    border-radius: 0.5em;
    background: var(--demo-accent-soft);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.mock-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mock-item-info {
    flex-grow: 1;
}

.mock-item-name {
    height: 0.5em;
    width: 60%;
    background: #cbd5e1;
    border-radius: 0.25em;
    margin-bottom: 0.35em;
}

.mock-item-sub {
    height: 0.45em;
    width: 40%;
    background: #e2e8f0;
    border-radius: 0.25em;
}

.mock-pill {
    font-size: 0.8em;
    font-weight: 700;
    padding: 0.25em 0.7em;
    border-radius: 2em;
    flex-shrink: 0;
}

.mock-pill.green { background: #e7f8ef; color: #16a34a; }
.mock-pill.orange { background: #fff3e6; color: #ea580c; }
.mock-pill.gray { background: #f1f5f9; color: #64748b; }

/* Formularios */
.mock-form {
    display: flex;
    flex-direction: column;
    gap: 0.55em;
}

.mock-field {
    border: 0.15em solid #e2e8f0;
    border-radius: 0.5em;
    height: 1.6em;
    background: #ffffff;
    padding: 0.2em 0.6em;
    display: flex;
    align-items: center;
}

.mock-field.textarea { height: 2.4em; }

.mock-field-label {
    font-size: 0.75em;
    font-weight: 700;
    color: #64748b;
    text-align: left;
    padding-left: 0.2em;
}

.mock-input-line {
    width: 70%;
    height: 0.4em;
    background: #e2e8f0;
    border-radius: 0.2em;
}

/* Status bar y tab bar (apps) */
.mock-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75em;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5em;
}

.mock-status-icons {
    display: flex;
    gap: 0.3em;
    align-items: center;
}

.mock-battery {
    width: 1.1em;
    height: 0.55em;
    border: 0.12em solid #1e293b;
    border-radius: 0.15em;
    position: relative;
}

.mock-battery::after {
    content: '';
    position: absolute;
    inset: 0.08em;
    background: #1e293b;
    border-radius: 0.05em;
}

.mock-tabbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 0.15em solid #eef2f7;
    padding-top: 0.5em;
    margin-top: 0.6em;
}

.mock-tab {
    width: 1.2em;
    height: 1.2em;
    border-radius: 0.3em;
    background: #e2e8f0;
}

.mock-tab.active {
    background: var(--demo-accent);
}

.mock-screen-title {
    font-size: 1.25em;
    font-weight: 800;
    color: var(--dark-blue);
    text-align: left;
    margin-bottom: 0.5em;
}

.mock-chips {
    display: flex;
    gap: 0.4em;
    flex-wrap: wrap;
    margin-bottom: 0.6em;
}

.mock-chip {
    font-size: 0.8em;
    font-weight: 600;
    color: #64748b;
    border: 0.12em solid #e2e8f0;
    border-radius: 2em;
    padding: 0.25em 0.7em;
}

.mock-chip.active {
    background: var(--demo-accent);
    border-color: var(--demo-accent);
    color: #ffffff;
}

/* Totales (checkout) */
.mock-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 0.15em dashed #cbd5e1;
    margin-top: 0.5em;
    padding-top: 0.5em;
}

.mock-total-label {
    font-size: 0.9em;
    color: #64748b;
}

.mock-total-value {
    font-size: 1.1em;
    font-weight: 800;
    color: var(--dark-blue);
}

.mock-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-size: 0.9em;
    font-weight: 700;
    color: var(--demo-accent);
    margin-bottom: 0.5em;
}

.mock-back::before {
    content: '←';
    font-size: 1.1em;
}

/* ============================================
   TEMAS POR DEMO
   ============================================ */
.demo-inmo { --demo-accent: #2563eb; --demo-accent-soft: #eff6ff; }
.demo-dental { --demo-accent: #0ea5e9; --demo-accent-soft: #f0f9ff; }
.demo-facturas { --demo-accent: #7c3aed; --demo-accent-soft: #f5f3ff; }
.demo-delivery { --demo-accent: #f97316; --demo-accent-soft: #fff7ed; }
.demo-store { --demo-accent: #4f46e5; --demo-accent-soft: #eef2ff; }

/* ============================================
   COTIZACIÓN
   ============================================ */
.demo-quote-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.demo-quote-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.demo-quote-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-quote-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
}

.demo-quote-btn.wa {
    background: #25d366;
    color: #ffffff;
}

.demo-quote-btn.wa:hover {
    background: #1eb75a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.demo-quote-btn.mail {
    background: var(--primary-blue);
    color: #ffffff;
}

.demo-quote-btn.mail:hover {
    background: #004d99;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3);
}

/* --- SECCIÓN COTIZA TU PROYECTO --- */
.quote-section {
    padding: 60px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.quote-container {
    max-width: 760px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #eef2f7;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.06);
    padding: 40px;
}

.quote-header {
    text-align: center;
    margin-bottom: 30px;
}

.quote-header h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    color: var(--dark-blue);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.quote-header h2 span {
    color: var(--primary-blue);
}

.quote-header p {
    font-size: 0.95rem;
    color: #64748b;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

.quote-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quote-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.quote-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quote-field label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
}

.quote-field input,
.quote-field select,
.quote-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #1e293b;
    background: #fbfdff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.quote-field input:focus,
.quote-field select:focus,
.quote-field textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
    background: #ffffff;
}

.quote-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Estados de validación */
.quote-field.has-error input,
.quote-field.has-error select,
.quote-field.has-error textarea {
    border-color: #ef4444;
    background: #fff7f7;
}

.quote-field.has-error input:focus,
.quote-field.has-error select:focus,
.quote-field.has-error textarea:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.quote-field.has-valid input,
.quote-field.has-valid select,
.quote-field.has-valid textarea {
    border-color: #22c55e;
}

.quote-error {
    display: none;
    font-size: 0.78rem;
    color: #ef4444;
    font-weight: 600;
}

.quote-field.has-error .quote-error {
    display: block;
}

.quote-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

.quote-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 28px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.quote-btn.wa {
    background: #25d366;
    color: #ffffff;
}

.quote-btn.wa:hover {
    background: #1eb75a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.quote-btn.mail {
    background: var(--primary-blue);
    color: #ffffff;
}

.quote-btn.mail:hover {
    background: #004d99;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
}

.quote-btn.is-loading {
    opacity: 0.7;
    cursor: wait;
    transform: none !important;
    box-shadow: none !important;
}

.quote-btn.is-success {
    background: #22c55e !important;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
}

.quote-btn.is-error {
    background: #ef4444 !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.quote-btn:disabled {
    cursor: wait;
}

.quote-note {
    text-align: center;
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1.5;
}

.quote-note strong {
    color: #475569;
}

.lightbox-quote {
    margin-top: 14px;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.demo-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    padding: 20px;
}

.demo-lightbox.open {
    display: flex;
}

.demo-lightbox-box {
    background: #ffffff;
    border-radius: 16px;
    max-width: 860px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.demo-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #475569;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: inherit;
}

.demo-lightbox-close:hover {
    background: #e2e8f0;
    color: var(--dark-blue);
}

.lightbox-header {
    text-align: center;
    margin-bottom: 20px;
    padding-right: 40px;
}

.lightbox-title {
    font-size: 1.4rem;
    color: var(--dark-blue);
    font-weight: 800;
    margin-bottom: 6px;
}

.lightbox-desc {
    font-size: 0.95rem;
    color: #64748b;
}

.lightbox-screens {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.lightbox-screens .demo-media {
    padding: 0;
    background: transparent;
    border: none;
    flex: 0 0 auto;
}

.lightbox-screens .browser-frame { font-size: 12px; }
.lightbox-screens .phone-frame { font-size: 16px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .digital-grid {
        grid-template-columns: 1fr;
        max-width: 460px;
    }
    .demo-media.app {
        gap: 10px;
    }
    .demo-media.app .phone-frame {
        font-size: 9px;
    }
    .lightbox-screens {
        flex-direction: column;
        align-items: center;
    }
    .quote-container {
        padding: 28px 20px;
    }
    .quote-grid {
        grid-template-columns: 1fr;
    }
    .quote-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .quote-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .digital-hero {
        padding: 50px 16px 40px;
    }
    .demo-media.app .phone-frame {
        font-size: 8.5px;
    }
}
