/* 
 * Thoughts Refilling - Custom Styles
 * Enhances Tailwind CDN with custom components
 */

:root {
    --primary: #FC5E39;
    --primary-dark: #e54d2a;
    --secondary: #135bec;
    --background-light: #ffffff;
    --background-dark: #101622;
    --surface-light: #f8f9fc;
    --text-main: #0d121b;
    --text-muted: #4c669a;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background: var(--background-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-delay-100 {
    animation-delay: 0.1s;
}

.animate-delay-200 {
    animation-delay: 0.2s;
}

.animate-delay-300 {
    animation-delay: 0.3s;
}

.animate-delay-400 {
    animation-delay: 0.4s;
}




/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(252, 94, 57, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 94, 57, 0.35);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Service Card Icon Animation */
.service-card .icon-wrapper {
    transition: all 0.3s ease;
}

.service-card:hover .icon-wrapper {
    background: var(--primary) !important;
    color: white !important;
}

/* Process Step Line */
.process-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: -1;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(252, 94, 57, 0.1);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--text-main);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    background: var(--text-main);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h1 {
        font-size: 2.25rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }
}

/* Hero Full Height (accounting for header) */
.hero-full-height {
    min-height: calc(100vh - 64px);
    /* 64px = header height (h-16) */
    min-height: calc(100dvh - 64px);
    /* Dynamic viewport height for mobile */
}

/* Hero Image Rotation */
.hero-image {
    transition: transform 0.5s ease;
}

.hero-image:hover {
    transform: rotate(0deg) !important;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Spacing */
section {
    position: relative;
}

/* Stats Counter */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn svg {
    width: 32px;
    height: 32px;
}

/* Service Page Styles */
.service-hero {
    min-height: 60vh;
}

.service-hero h1 .gradient-text,
h1 .gradient-text,
.gradient-text {
    background: linear-gradient(135deg, var(--primary), #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pain Point Cards */
.pain-point-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.pain-point-card:hover {
    transform: translateY(-4px);
}

/* Tech Stack Items */
.tech-item {
    min-width: 100px;
}

.tech-item:hover .material-symbols-outlined {
    color: var(--primary-dark);
    transform: scale(1.1);
}

.tech-item .material-symbols-outlined {
    transition: all 0.3s ease;
}

/* Value Cards */
.value-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

/* Process Steps */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 48px;
    left: 100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0.2;
}

.process-step:last-child::after {
    display: none;
}

@media (max-width: 1024px) {
    .process-step::after {
        display: none;
    }
}

/* FAQ Accordion */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-trigger:focus {
    outline: none;
}

.faq-content {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Case Study Section */
.case-study-image {
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ===============================================
   BOOKING MODAL STYLES
   =============================================== */

/* Modal Overlay */
.booking-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.booking-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.booking-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden;
}

.booking-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Modal Header */
.booking-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, var(--primary), #ff8c42);
    color: white;
}

.booking-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.booking-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.booking-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Content */
.booking-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-height: calc(90vh - 160px);
    overflow-y: auto;
}

@media (max-width: 768px) {
    .booking-modal-content {
        grid-template-columns: 1fr;
    }
}

/* Calendar Section */
.booking-calendar-section {
    padding: 1.5rem;
    border-right: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .booking-calendar-section {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
}

.booking-calendar-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Calendar */
.booking-calendar {
    background: var(--surface-light);
    border-radius: 0.75rem;
    padding: 1rem;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.calendar-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-nav button {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.calendar-nav button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.calendar-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-name {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    color: var(--text-main);
    border: 1px solid transparent;
}

.calendar-day:hover:not(.disabled):not(.selected) {
    border-color: var(--primary);
    color: var(--primary);
}

.calendar-day.today {
    border-color: var(--primary);
}

.calendar-day.selected {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.calendar-day.disabled {
    color: #d1d5db;
    cursor: not-allowed;
    background: transparent;
}

.calendar-day.other-month {
    color: #d1d5db;
}

/* Time Slots Section */
.booking-time-section {
    padding: 1.5rem;
}

.booking-time-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-slots-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.time-slot {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.time-slot:hover:not(.disabled):not(.selected) {
    border-color: var(--primary);
    color: var(--primary);
}

.time-slot.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.no-slots-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.no-slots-message .material-symbols-outlined {
    font-size: 3rem;
    color: #e5e7eb;
    margin-bottom: 0.5rem;
}

/* Booking Form Section */
.booking-form-section {
    padding: 1.5rem;
    grid-column: span 2;
    border-top: 1px solid #e5e7eb;
    background: var(--surface-light);
}

@media (max-width: 768px) {
    .booking-form-section {
        grid-column: span 1;
    }
}

.booking-form-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.booking-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 640px) {
    .booking-form {
        grid-template-columns: 1fr;
    }
}

.booking-form .form-group {
    display: flex;
    flex-direction: column;
}

.booking-form .form-group.full-width {
    grid-column: span 2;
}

@media (max-width: 640px) {
    .booking-form .form-group.full-width {
        grid-column: span 1;
    }
}

.booking-form textarea.form-input {
    min-height: 80px;
    resize: vertical;
}

.booking-form .btn-submit {
    grid-column: span 2;
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .booking-form .btn-submit {
        grid-column: span 1;
    }
}

/* Selected Date/Time Display */
.selected-datetime {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.selected-datetime .material-symbols-outlined {
    color: #22c55e;
    font-size: 1.5rem;
}

.selected-datetime-info {
    flex: 1;
}

.selected-datetime-info .date {
    font-weight: 600;
    color: var(--text-main);
}

.selected-datetime-info .time {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Loading State */
.slots-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
}

.slots-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Step Indicator */
.booking-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-light);
}

.booking-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.booking-step.active {
    color: var(--primary);
    font-weight: 600;
}

.booking-step.completed {
    color: #22c55e;
}

.booking-step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.booking-step.active .booking-step-number {
    background: var(--primary);
    color: white;
}

.booking-step.completed .booking-step-number {
    background: #22c55e;
    color: white;
}

.step-line {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
}

.step-line.completed {
    background: #22c55e;
}

/* Success State */
.booking-success {
    text-align: center;
    padding: 3rem 2rem;
}

.booking-success-icon {
    width: 80px;
    height: 80px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.booking-success-icon .material-symbols-outlined {
    font-size: 3rem;
    color: #22c55e;
}

.booking-success h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.booking-success p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.booking-details {
    background: var(--surface-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.booking-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.booking-detail-row:last-child {
    border-bottom: none;
}

.booking-detail-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.booking-detail-value {
    font-weight: 600;
    color: var(--text-main);
}

/* ===============================================
   CASE STUDY PAGE STYLES
   =============================================== */

/* Case Study Hero */
.case-study-hero {
    min-height: 60vh;
}

/* Metric Card */
.metric-card {
    padding: 0.5rem 0;
}

/* Case Study Card Hover */
.case-study-card {
    transition: all 0.3s ease;
}

.case-study-card:hover {
    transform: translateY(-8px);
}

/* Prose Styling */
.prose {
    line-height: 1.75;
}

.prose p {
    margin-bottom: 1rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

/* Filter Button Active State */
.filter-btn.active {
    background: var(--primary) !important;
    color: white !important;
}

/* Related Case Study Cards */
.related-case-study {
    transition: all 0.3s ease;
}

.related-case-study:hover {
    transform: translateY(-4px);
}

/* Breadcrumb Styling */
nav ol li a {
    transition: color 0.2s ease;
}

/* Sticky Sidebar */
@media (min-width: 1024px) {
    .sticky {
        position: sticky;
    }
}

/* Animation for filtered items */
.case-study-card.animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out forwards;
}

/* ===============================================
   CLIENT LOGOS CAROUSEL
   =============================================== */

.client-logos-carousel {
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.client-logos-track {
    animation: scroll-logos 20s linear infinite;
    width: max-content;
}

.client-logos-track img {
    opacity: 0.7;
    transition: opacity 0.3s ease, filter 0.3s ease;
    filter: grayscale(30%);
}

.client-logos-track img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.client-logos-carousel:hover .client-logos-track {
    animation-play-state: paused;
}

@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}