/**
 * ADCO Tunnel - Public Stylesheet
 * Premium Sales Funnel Design
 */

/* ========================================
   BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a2e;
    background-color: #ffffff;
    min-height: 100vh;
}

.public-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0a58ca;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   FUNNEL PAGE
   ======================================== */

.funnel-page {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.funnel-header {
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #f1f1f1;
    position: sticky;
    top: 0;
    z-index: 100;
}

.funnel-logo {
    max-height: 40px;
}

.funnel-progress {
    height: 4px;
    background: #e9ecef;
    position: relative;
}

.funnel-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #0dcaf0);
    transition: width 0.5s ease;
}

.funnel-content {
    flex: 1;
    padding: 40px 20px;
}

.funnel-container {
    max-width: 800px;
    margin: 0 auto;
}

.funnel-footer {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #6c757d;
    border-top: 1px solid #f1f1f1;
}

/* ========================================
   STEP ELEMENTS
   ======================================== */

/* Title */
.element-title {
    margin-bottom: 25px;
}

.element-title h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

.element-title h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a2e;
}

/* Subtitle */
.element-subtitle {
    margin-bottom: 20px;
}

.element-subtitle p {
    font-size: 20px;
    color: #6c757d;
    font-weight: 400;
}

/* Description */
.element-description {
    margin-bottom: 25px;
}

.element-description p {
    font-size: 16px;
    color: #495057;
    line-height: 1.8;
}

/* Rich Text */
.element-richtext {
    margin-bottom: 25px;
}

.element-richtext ul,
.element-richtext ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.element-richtext li {
    margin-bottom: 8px;
}

.element-richtext blockquote {
    padding: 20px 25px;
    border-left: 4px solid var(--primary-color);
    background: #f8f9fc;
    margin: 20px 0;
    font-style: italic;
}

/* Image */
.element-image {
    margin-bottom: 25px;
    text-align: center;
}

.element-image img {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.element-image figcaption {
    margin-top: 12px;
    font-size: 14px;
    color: #6c757d;
}

/* Video */
.element-video {
    margin-bottom: 25px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Button / CTA */
.element-button {
    margin-bottom: 25px;
    text-align: center;
}

.funnel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.funnel-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(13, 110, 253, 0.4);
    color: #fff;
}

.funnel-btn:active {
    transform: translateY(-1px);
}

.funnel-btn.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.funnel-btn.secondary {
    background: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.funnel-btn.secondary:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Form */
.element-form {
    margin-bottom: 25px;
}

.funnel-form {
    background: #fff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.funnel-form .form-group {
    margin-bottom: 20px;
}

.funnel-form .form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.funnel-form .form-control {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.funnel-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.funnel-form .form-control::placeholder {
    color: #adb5bd;
}

.funnel-form .form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
}

.funnel-form textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.funnel-form .form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.funnel-form .form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.funnel-form .form-check-label {
    cursor: pointer;
}

.funnel-form .submit-btn {
    width: 100%;
    margin-top: 10px;
}

/* ==================================================
   COUNTDOWN TIMER v2 — Always horizontal, single line
   ================================================== */

.countdown-timer,
.countdown-component {
    width: 100%;
    text-align: center;
}

.countdown-animated {
    display: inline-block;
    width: 100%;
}

.countdown-animated .countdown-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    opacity: 0.85;
    font-weight: 600;
}

/* Units row — ALWAYS horizontal, never wraps */
.countdown-units {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.countdown-digit-wrap {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    color: #fff;
    border-radius: 10px;
    min-width: 68px;
    padding: 12px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
}

/* Horizontal line in the middle for flip-clock look */
.countdown-digit-wrap::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
}

.countdown-digit {
    font-size: 30px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    display: inline-block;
}

/* Flip animation on digit change */
.countdown-digit.countdown-flip {
    animation: cdFlip 0.4s ease;
}

@keyframes cdFlip {
    0%   { transform: perspective(200px) rotateX(0deg);   opacity: 1; }
    40%  { transform: perspective(200px) rotateX(-90deg);  opacity: 0; }
    60%  { transform: perspective(200px) rotateX(90deg);   opacity: 0; }
    100% { transform: perspective(200px) rotateX(0deg);    opacity: 1; }
}

/* Colon separator with blink */
.countdown-sep {
    font-size: 26px;
    font-weight: 700;
    opacity: 0.5;
    line-height: 1;
    margin-bottom: 18px; /* align with digit (above label) */
    animation: cdBlink 1s step-end infinite;
    flex-shrink: 0;
    user-select: none;
}

@keyframes cdBlink {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 0; }
}

.countdown-unit-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
    opacity: 0.7;
}

/* ---- Responsive: keep horizontal, just shrink ---- */
@media (max-width: 480px) {
    .countdown-units { gap: 4px; }
    .countdown-digit-wrap { min-width: 52px; padding: 10px 6px; border-radius: 8px; }
    .countdown-digit { font-size: 22px; }
    .countdown-sep { font-size: 20px; margin-bottom: 14px; }
    .countdown-unit-label { font-size: 9px; letter-spacing: 0.5px; }
    .countdown-animated .countdown-label { font-size: 12px; letter-spacing: 1px; }
}

@media (max-width: 350px) {
    .countdown-units { gap: 2px; }
    .countdown-digit-wrap { min-width: 42px; padding: 8px 4px; }
    .countdown-digit { font-size: 18px; }
    .countdown-sep { font-size: 16px; margin-bottom: 12px; }
    .countdown-unit-label { font-size: 8px; }
}

/* Urgency state — red glow when < 5 min */
.countdown-urgent .countdown-digit-wrap {
    background: linear-gradient(145deg, #7f1d1d, #dc2626);
    animation: cdPulse 1.5s ease-in-out infinite;
}

@keyframes cdPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(220,38,38,0.3); }
    50%      { box-shadow: 0 4px 28px rgba(220,38,38,0.6); }
}

.countdown-expired .countdown-digit-wrap {
    opacity: 0.45;
}

/* Legacy class support */
.countdown-item {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    padding: 20px 25px;
    border-radius: 15px;
    min-width: 90px;
    text-align: center;
}

.countdown-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.timer-message {
    margin-top: 15px;
    font-weight: 600;
    color: #dc3545;
}

/* Testimonials */
.element-testimonial {
    margin-bottom: 25px;
}

.testimonial-card {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.testimonial-content {
    font-size: 18px;
    font-style: italic;
    color: #495057;
    margin-bottom: 20px;
    position: relative;
}

.testimonial-content::before {
    content: '"';
    font-size: 60px;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: -20px;
    left: -10px;
    font-family: Georgia, serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-info {
    flex: 1;
}

.testimonial-name {
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 3px;
}

.testimonial-location {
    font-size: 14px;
    color: #6c757d;
}

.testimonial-rating {
    color: #ffc107;
    font-size: 14px;
}

/* FAQ / Accordion */
.element-faq {
    margin-bottom: 25px;
}

.faq-item {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: 600;
    color: #1a1a2e;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: #f8f9fc;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 25px 20px;
    max-height: 500px;
}

/* Benefits / Features */
.element-benefits {
    margin-bottom: 25px;
}

.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f1f1f1;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefits-list .icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    border-radius: 10px;
    flex-shrink: 0;
}

.benefits-list .text {
    flex: 1;
}

.benefits-list .text strong {
    display: block;
    margin-bottom: 3px;
    color: #1a1a2e;
}

/* Guarantee */
.element-guarantee {
    margin-bottom: 25px;
}

.guarantee-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fc, #fff);
    border: 2px dashed var(--primary-color);
    border-radius: 15px;
}

.guarantee-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 30px;
    flex-shrink: 0;
}

.guarantee-content h4 {
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 5px;
}

.guarantee-content p {
    color: #6c757d;
    margin: 0;
}

/* ========================================
   SOCIAL PROOF NOTIFICATIONS
   ======================================== */

#social-proof-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-proof-notification {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 350px;
    animation: slideIn 0.5s ease;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.social-proof-notification:hover {
    transform: translateX(5px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

.social-proof-notification.hide {
    animation: slideOut 0.5s ease forwards;
}

.social-proof-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.social-proof-content {
    flex: 1;
}

.social-proof-name {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 14px;
}

.social-proof-action {
    color: #6c757d;
    font-size: 13px;
}

.social-proof-time {
    font-size: 11px;
    color: #adb5bd;
    margin-top: 3px;
}

.social-proof-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.social-proof-notification:hover .social-proof-close {
    opacity: 1;
}

/* ========================================
   CALENDAR / DATE PICKER
   ======================================== */

.element-calendar {
    margin-bottom: 25px;
}

.calendar-widget {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-title {
    font-weight: 600;
    font-size: 18px;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fc;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.calendar-nav button:hover {
    background: #e9ecef;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    padding: 10px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.calendar-day:hover:not(.disabled) {
    background: var(--primary-color);
    color: #fff;
}

.calendar-day.disabled {
    color: #dee2e6;
    cursor: not-allowed;
}

.calendar-day.selected {
    background: var(--primary-color);
    color: #fff;
}

.calendar-day.today {
    border: 2px solid var(--primary-color);
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.time-slot {
    padding: 12px;
    text-align: center;
    background: #f8f9fc;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.time-slot:hover:not(.disabled) {
    border-color: var(--primary-color);
}

.time-slot.selected {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.time-slot.disabled {
    color: #dee2e6;
    cursor: not-allowed;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 767.98px) {
    .funnel-content {
        padding: 25px 15px;
    }
    
    .element-title h1 {
        font-size: 28px;
    }
    
    .element-subtitle p {
        font-size: 17px;
    }
    
    .funnel-btn {
        padding: 15px 30px;
        font-size: 16px;
        width: 100%;
    }
    
    .funnel-form {
        padding: 25px 20px;
    }
    
    .countdown-timer,
    .countdown-component {
        gap: 6px;
    }
    
    .countdown-units {
        gap: 5px;
    }
    
    .countdown-digit-wrap {
        min-width: 56px;
        padding: 10px 6px;
    }
    
    .countdown-digit {
        font-size: 24px;
    }
    
    .countdown-sep {
        font-size: 20px;
    }
    
    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #social-proof-container {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .social-proof-notification {
        max-width: 100%;
    }
    
    .guarantee-box {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #0dcaf0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    background: linear-gradient(180deg, transparent 50%, rgba(13, 110, 253, 0.2) 50%);
    padding: 0 5px;
}

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

@media (max-width: 767.98px) {
    .d-md-none {
        display: none !important;
    }
}
