/**
 * About Me Widget Styles
 *
 * Credentials timeline, services grid, and profile section
 * for the homepage About Me widget.
 *
 * @package RyanOConnellToolkit
 * @since 1.1.0
 */

/* ============================================
   CSS CUSTOM PROPERTIES (set via inline style)
   ============================================ */
.about-me-widget {
    --about-primary: #2563eb;
    --about-secondary: #1e40af;
    --about-text: #1e293b;
    --about-muted: #64748b;
    --about-light: #f8fafc;
}

/* ============================================
   WIDGET CONTAINER
   ============================================ */
.about-me-widget {
    padding: 80px 0;
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;
}

.about-me-bg-transparent {
    background: transparent;
}

.about-me-bg-white {
    background: #ffffff;
}

.about-me-bg-light-gray {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.about-me-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   SECTION TITLE
   ============================================ */
.about-me-section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--about-text);
    margin: 0 0 50px 0;
    position: relative;
}

.about-me-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--about-primary), var(--about-secondary));
    margin: 16px auto 0;
    border-radius: 2px;
}

/* ============================================
   PROFILE SECTION
   ============================================ */
.about-me-profile {
    display: flex;
    align-items: center;
    gap: 30px;
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 50px;
}

.about-me-image {
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-me-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.25);
}

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

.about-me-intro {
    flex: 1;
}

.about-me-experience {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.experience-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--about-primary);
    line-height: 1;
}

.experience-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--about-text);
}

.about-me-bio {
    font-size: 16px;
    line-height: 1.7;
    color: var(--about-muted);
    margin: 0;
    max-width: 600px;
}

/* ============================================
   CREDENTIALS TIMELINE
   ============================================ */
.about-me-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 20px 0 40px;
    margin-bottom: 50px;
}

/* Horizontal connecting line */
.about-me-timeline::before {
    content: '';
    position: absolute;
    top: 55px;
    left: 50px;
    right: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--about-primary), var(--about-secondary));
    border-radius: 2px;
}

.timeline-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

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

.timeline-year {
    font-size: 14px;
    font-weight: 700;
    color: var(--about-primary);
    margin-bottom: 8px;
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: var(--about-primary);
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 3px var(--about-primary);
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.3);
}

.timeline-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 160px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.timeline-item:hover .timeline-card {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.2);
}

.timeline-logo {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(30, 64, 175, 0.05));
    border-radius: 12px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.timeline-item:hover .timeline-logo {
    background: linear-gradient(135deg, var(--about-primary), var(--about-secondary));
    transform: scale(1.1);
}

.timeline-logo img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
}

.timeline-logo i {
    font-size: 24px;
    color: var(--about-primary);
    transition: color 0.3s ease;
}

.timeline-item:hover .timeline-logo i {
    color: #ffffff;
}

.timeline-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--about-text);
    margin-bottom: 4px;
}

.timeline-subtitle {
    font-size: 12px;
    color: var(--about-muted);
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.about-me-services {
    margin-bottom: 50px;
}

.services-heading {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--about-text);
    margin: 0 0 30px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
    text-decoration: none;
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(30, 64, 175, 0.05));
    border-radius: 14px;
    margin-bottom: 16px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--about-primary), var(--about-secondary));
    transform: scale(1.1) rotate(5deg);
}

.service-icon i {
    font-size: 24px;
    color: var(--about-primary);
    transition: color 0.3s ease;
}

.service-card:hover .service-icon i {
    color: #ffffff;
}

.service-content {
    flex: 1;
}

.service-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--about-text);
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.service-card:hover .service-title {
    color: var(--about-primary);
}

.service-description {
    font-size: 12px;
    color: var(--about-muted);
    line-height: 1.4;
}

/* ============================================
   CTA SECTION
   ============================================ */
.about-me-cta {
    text-align: center;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--about-primary) 0%, var(--about-secondary) 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.cta-button i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(4px);
}

/* ============================================
   RESPONSIVE - TABLET (< 992px)
   ============================================ */
@media (max-width: 991px) {
    .about-me-widget {
        padding: 60px 0;
    }

    .about-me-section-title {
        font-size: 30px;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .timeline-card {
        max-width: 140px;
        padding: 16px 12px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (< 768px)
   ============================================ */
@media (max-width: 767px) {
    .about-me-widget {
        padding: 50px 0;
    }

    .about-me-section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }

    /* Profile: Stack vertically */
    .about-me-profile {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        gap: 20px;
    }

    .about-me-image {
        margin: 0 auto;
    }

    .about-me-experience {
        justify-content: center;
    }

    .experience-number {
        font-size: 36px;
    }

    .about-me-bio {
        max-width: 100%;
    }

    /* Timeline: Vertical layout */
    .about-me-timeline {
        flex-direction: column;
        padding-left: 40px;
        gap: 30px;
    }

    .about-me-timeline::before {
        width: 3px;
        height: calc(100% - 40px);
        top: 20px;
        left: 18px;
        right: auto;
    }

    .timeline-item {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 16px;
    }

    .timeline-year {
        position: absolute;
        left: -40px;
        top: 0;
        width: 36px;
        padding: 2px 4px;
        font-size: 11px;
    }

    .timeline-dot {
        position: absolute;
        left: -22px;
        top: 40px;
        margin-bottom: 0;
    }

    .timeline-card {
        max-width: 100%;
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
        padding: 16px;
    }

    .timeline-logo {
        margin: 0;
        flex-shrink: 0;
    }

    /* Services: Stack vertically */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .service-card {
        flex-direction: row;
        text-align: left;
        padding: 16px;
        gap: 16px;
    }

    .service-icon {
        margin-bottom: 0;
        flex-shrink: 0;
        width: 48px;
        height: 48px;
    }

    .service-icon i {
        font-size: 20px;
    }

    .service-title {
        font-size: 15px;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
}

/* ============================================
   ACCESSIBILITY - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .timeline-item,
    .service-card {
        animation: none;
        opacity: 1;
    }

    .about-me-image,
    .timeline-dot,
    .timeline-card,
    .timeline-logo,
    .service-card,
    .service-icon,
    .cta-button,
    .cta-button i {
        transition: none;
    }
}
