/**
 * Pages Stylesheet
 * Custom styles for About and Contact pages
 */

/* ============================================================
   SKIP LINK (Accessibility)
   ============================================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--ts-accent);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ============================================================
   RESPONSIVE TABLES
   ============================================================ */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    table thead {
        display: none;
    }

    table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--ts-border-subtle);
        border-radius: 8px;
        padding: 1rem;
    }

    table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
    }

    table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--ts-heading);
        margin-right: 1rem;
    }
}

/* ============================================================
   SMOOTH ANIMATIONS
   ============================================================ */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

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

/* ============================================================
   HOVER EFFECTS
   ============================================================ */
.ts-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ts-card:hover {
    transform: translateY(-2px);
}

/* ============================================================
   GRADIENT TEXT
   ============================================================ */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   HERO SECTION ENHANCEMENTS
   ============================================================ */
.hero-badge {
    position: relative;
    overflow: hidden;
}

.hero-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.hero-badge:hover::before {
    left: 100%;
}

/* ============================================================
   FORM STYLES
   ============================================================ */
.ts-input:focus {
    outline: none;
    border-color: var(--ts-accent);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ts-input[aria-invalid="true"] {
    border-color: #ef4444;
}

.ts-input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Character counter */
.char-counter {
    transition: color 0.2s ease;
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
#toast {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================
   COPY BUTTON EFFECTS
   ============================================================ */
.copy-email-btn {
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-email-btn:hover {
    transform: scale(1.1);
    color: var(--ts-accent);
}

.copy-email-btn:active {
    transform: scale(0.95);
}

/* ============================================================
   RECAPTCHA STYLING
   ============================================================ */
.g-recaptcha {
    display: inline-block;
}

/* Dark theme adjustments for reCAPTCHA */
[data-theme="dark"] .g-recaptcha {
    filter: invert(1) hue-rotate(180deg);
}

/* ============================================================
   STATISTICS GRID
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* ============================================================
   FEATURE GRID
   ============================================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ============================================================
   SOCIAL ICONS
   ============================================================ */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ts-bg-surface);
    border: 1px solid var(--ts-border-subtle);
    transition: all 0.2s ease;
}

.social-icon:hover {
    background: var(--ts-accent);
    border-color: var(--ts-accent);
    color: white;
    transform: translateY(-2px);
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* ============================================================
   BUTTON ENHANCEMENTS
   ============================================================ */
.ts-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ts-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.ts-btn:hover::before {
    width: 300px;
    height: 300px;
}

.ts-btn:active {
    transform: scale(0.98);
}

/* ============================================================
   SCROLLBAR CUSTOMIZATION
   ============================================================ */
.ts-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.ts-scrollbar::-webkit-scrollbar-track {
    background: var(--ts-bg-surface);
}

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

.ts-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--ts-accent);
}

/* ============================================================
   COMPARISON TABLE ENHANCEMENTS
   ============================================================ */
table tbody tr {
    transition: background-color 0.2s ease;
}

table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    header,
    footer,
    #mobile-menu-btn,
    #mobile-menu,
    .ts-btn,
    .g-recaptcha {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .ts-card {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
        color: #0066cc;
    }

    h1, h2, h3, h4 {
        page-break-after: avoid;
    }
}

/* ============================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================ */
/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--ts-accent);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ts-card {
        border-width: 2px;
    }

    .ts-btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 640px) {
    .text-4xl {
        font-size: 2rem;
    }

    .text-5xl {
        font-size: 2.5rem;
    }

    .text-6xl {
        font-size: 3rem;
    }

    .p-12 {
        padding: 2rem;
    }

    .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .px-8 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .gap-8 {
        gap: 1rem;
    }

    .space-x-6 > :not([hidden]) ~ :not([hidden]) {
        margin-left: 1rem;
    }
}

/* ============================================================
   FOOTER STICKY
   ============================================================ */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* ============================================================
   LINK UNDERLINE ANIMATION
   ============================================================ */
.ts-link {
    position: relative;
    text-decoration: none;
}

.ts-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--ts-accent);
    transition: width 0.3s ease;
}

.ts-link:hover::after {
    width: 100%;
}

/* ============================================================
   GRADIENT BACKGROUNDS
   ============================================================ */
.gradient-bg {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.gradient-border {
    border: 1px solid transparent;
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* ============================================================
   ICON PULSE ANIMATION
   ============================================================ */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.icon-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
