
/* Additional custom styles to complement the Webflow CSS */
/* This file can contain any custom styles you want to add */

/* Basic reset and typography improvements */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

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

/* Custom timeline animations */
.timeline_progress-bar {
    transition: height 0.3s ease;
}

.timeline_item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.timeline_item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effects for buttons */
.button-icon-small,
.button-icon-small-secondary {
    transition: transform 0.3s ease;
}

.button-icon-small:hover,
.button-icon-small-secondary:hover {
    transform: translateY(-2px);
}

/* Quote wrapper animations */
.timeline_quote-wrapper-copy {
    transition: transform 0.3s ease;
}

.timeline_quote-wrapper-copy:hover {
    transform: translateY(-5px);
}

/* ===== WEBFLOW BADGE REMOVAL ===== */
/* Hide any Webflow badges that might be injected by scripts */
.w-webflow-badge,
[class*="webflow-badge"],
[class*="w-webflow"],
a[href*="webflow.com"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ===== FOOTER BUTTON IMPROVEMENTS ===== */
/* Fix footer button logos to match navigation size */
.section-footer .button-icon {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain !important;
}

.section-footer .button-icon-small,
.section-footer .button-icon-small-secondary {
    padding: 12px !important;
}

/* ===== MOBILE RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    /* Mobile Navigation - All 4 buttons in single horizontal row */
    .hero-nav_button-wrapper {
        display: flex !important;
        gap: 4px;
        justify-content: center;
        flex-wrap: nowrap !important; /* Force single row */
        padding: 15px 5px;
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    
    .button-icon-small,
    .button-icon-small-secondary {
        display: flex !important; /* Override hide-mobile class */
        align-items: center;
        justify-content: center;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        padding: 6px !important;
        margin: 0 !important;
        border-radius: 6px !important;
        transition: all 0.2s ease;
        background-color: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        overflow: hidden;
        flex-shrink: 0; /* Prevent buttons from shrinking */
    }
    
    /* Hover effect for mobile buttons */
    .button-icon-small:hover,
    .button-icon-small-secondary:hover {
        transform: translateY(-1px);
        background-color: rgba(255, 255, 255, 0.15);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* Hide ALL text labels on mobile */
    .button-icon-small div,
    .button-icon-small-secondary div,
    #chess-nav-text {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Make logo images visible and properly sized for smaller buttons */
    .button-icon {
        width: 20px !important;
        height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        object-fit: contain !important;
        object-position: center !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        filter: none !important;
        background: transparent !important;
    }
    
    /* Force visibility for all button icons with adjusted size */
    .button-icon-small img,
    .button-icon-small-secondary img,
    .hero-nav_button-wrapper img {
        width: 20px !important;
        height: 20px !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        object-fit: contain !important;
        margin: 0 auto !important;
    }
    
    /* Timeline Mobile Layout */
    .timeline_item {
        display: flex;
        flex-direction: row;
        margin-bottom: 30px;
        align-items: flex-start;
    }
    
    .timeline_left {
        width: 80px !important;
        flex-shrink: 0;
        order: 1;
        margin-right: 15px;
        text-align: center !important;
    }
    
    .timeline_right {
        width: calc(100% - 95px) !important;
        order: 2;
        flex: 1;
    }
    
    .timeline_centre {
        display: none;
    }
    
    /* Keep dates vertical (writing-mode vertical) on mobile alongside content */
    .timeline_date-text.vertical-text {
        writing-mode: vertical-lr !important; /* Keep vertical writing mode */
        text-orientation: mixed;
        transform: none !important;
        font-size: 0.8em;
        font-weight: bold;
        color: #666;
        text-align: center;
        padding: 8px 4px;
        border-right: 2px solid #333;
        height: auto;
        min-height: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .timeline_component {
        padding: 0 20px;
    }
    
    /* Timeline progress bar - hide on mobile for cleaner look */
    .timeline_progress {
        display: none;
    }
}

/* Loading states */
.timeline_image-wrapper img {
    transition: opacity 0.3s ease;
}

.timeline_image-wrapper img:not([src]) {
    opacity: 0;
}

/* Print styles */
@media print {
    .hero-nav,
    .section-timeline-cta,
    .section-footer {
        display: none;
    }
    
    .timeline_progress {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    /* Ensure good contrast for print */
    .text-colour-lightgrey {
        color: #333 !important;
    }
    
    /* Page breaks for better print layout */
    .timeline_item {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* ===== CHESS.COM NAVIGATION BUTTON ===== */
/* Styling for the compact Chess.com puzzle rating button */
#chess-nav-button {
    white-space: nowrap;
}

#chess-nav-text {
    font-size: 0.9em;
    font-weight: bold;
    white-space: nowrap;
}

/* ===== FUTURE FEATURES STYLING ===== */
/* Placeholder styles for upcoming Chess.com and certification features */

/* Chess.com puzzle rating card */
.chess-rating-wrapper {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chess-rating-wrapper:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.chess-rating-wrapper h5 {
    margin: 0 0 10px 0;
    color: #ecf0f1;
}

#chess-rating-display {
    font-size: 1.5em;
    font-weight: bold;
}

.rating-change.positive {
    color: #2ecc71; /* Green for positive rating changes */
}

.rating-change.negative {
    color: #e74c3c; /* Red for negative rating changes */
}

/* Certification badges container */
#certifications-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.certification-badge {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.certification-badge:hover {
    transform: scale(1.1);
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
/* Enhanced accessibility for screen readers and keyboard navigation */

/* Focus styles for keyboard navigation */
.button-icon-small:focus,
.button-icon-small-secondary:focus,
#contact-email:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .timeline_item {
        border: 1px solid;
    }
    
    .text-colour-lightgrey {
        color: #000 !important;
    }
}

/* Reduced motion preference support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===== DARK MODE SUPPORT (FUTURE) ===== */
/* Placeholder for future dark mode implementation */
/*
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .timeline_item {
        background-color: #2d2d2d;
    }
}
*/