/*
 * Component Styles for hblondel.co.uk
 * Contains: Buttons, cards, forms, navigation, modals, widgets
 */
/* Unified Navigation */
/* Navigation Design System */
:root {
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-border: #e5e7eb;
    --nav-text: #374151;
    --nav-text-hover: #1f2937;
    --nav-active-bg: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --nav-active-text: #ffffff;
    --nav-divider: #d1d5db;
    --nav-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --nav-shadow-hover: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.main-navigation {
    justify-content: right;
    position: sticky;
    top: 0;
    z-index: 100;
    contain: layout style;
    will-change: transform;
    margin: 20px 0;
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    border: 2px solid transparent;
    contain: layout style;
    will-change: transform, background-color;
}

.nav-item:hover {
    background: #f8fafc;
    color: #1f2937;
    text-decoration: none;
    border-color: #e2e8f0;
    transform: translateY(-2px) translateZ(0);
    backface-visibility: hidden;
}

.nav-item.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-item.active:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: white;
    transform: translateY(-2px);
}

.nav-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.025em;
}

.nav-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

.nav-divider {
    color: #d1d5db;
    font-weight: 300;
    font-size: 16px;
    margin: 0 4px;
    opacity: 0.6;
}

/* Close button */
.close-button {
    display: block;
    position: relative;
    transform: none;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    overflow: hidden;
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: min-content;
}

.close-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: white;
    background-color: var(--accent-color);
    opacity: 95%;
}

/* Add smooth transitions to the elements you'll be animating */
body,
.nav-item {
    transition: all 0.3s ease-in-out;
}

/* Define the animated state for the body when the page is transitioning */
body.page-transitioning {
    opacity: 0.95;
    transform: scale(0.98);
}

/* Define the animated state for the clicked navigation item */
.nav-item-active {
    opacity: 0.7;
    transform: scale(0.95);
}

/* Add to pages.css or components.css */
body.modal-open {
    /* Filters are a modern, performant way to blur the background */
    filter: blur(5px);
    overflow: hidden; /* Prevent scrolling of the page behind the modal */
}

/* Ensure the modal is not blurred */
.modal {
    filter: none;
}

/* Social Media Buttons */
.btn {
  /* Ensure a consistent font family for all buttons to avoid size inconsistencies. */
  font-family: 'Montserrat', sans-serif; 
  /* Add or modify other general button styles here. */
}

.btn-disabled {
    opacity: 0.50;
}

.btn-social {
    display: block;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    justify-content: center;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.social-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-social:hover .social-icon {
    transform: scale(1.1);
}

.btn-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* LinkedIn Specific Styling */
.btn-linkedin {
    background: linear-gradient(135deg, #0077B5 0%, #005885 100%);
    color: white;
}

.btn-linkedin:hover {
    background: linear-gradient(135deg, #005885 0%, #004066 100%);
    color: white;
}

/* Email Specific Styling */
.btn-email {
    background: linear-gradient(135deg, #4F46E5 0%, #3B82F6 100%);
    color: white;
}

.btn-email:hover {
    background: linear-gradient(135deg, #D33B2C 0%, #B52D20 100%);
    color: white;
}

.btn-book-session {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4F46E5 0%, #3B82F6 100%);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-book-session:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    color: white;
    text-decoration: none;
}

.book-icon {
    transition: transform 0.3s ease;
}

.btn-book-session:hover .book-icon {
    transform: scale(1.1);
}

.section-h3 {
    font-family: 'Montserrat', sans-serif; /* Explicitly use Montserrat */
    font-size: 1.3rem;
    color: var(--accent-secondary); /* EDIT: Uses new accent-secondary color */
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.section-h2 {
    font-family: 'Montserrat', sans-serif; /* Explicitly use Montserrat */
    color: var(--accent-color); /* EDIT: Uses new accent color */
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.small-section {
    font-size: 0.9rem;
    padding-bottom: 10px;
}

.medium-section {
    padding-bottom: 20px;
}

.large-section {
    margin-bottom: 0rem;
}

iframe {
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    animation: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .btn-social {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .social-icon {
        width: 18px;
        height: 18px;
    }
}

/* Alternative: Icon-only version for mobile */
@media (max-width: 480px) {
    .btn-text {
        display: none;
    }
    
    .btn-social {
        padding: 12px;
        width: 44px;
        height: 44px;
        justify-content: center;
    }
}


 /* Buttons */
.btn {
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.btn:hover {
    background-color: #1e3d6f;
}

.btn, .contact-btn, .book-session-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--button-bg-light);
    color: var(--button-text-light);
}

.btn:hover, .contact-btn:hover, .book-session-btn:hover {
    background-color: var(--button-hover-bg-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #1f2937;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
}

.btn-submit {
    background-color: var(--accent-color);
    color: white;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.controls {
    margin-bottom: 20px;
    margin-top: 10px;
    text-align: center;
    align-items: center;
}

.cv-btn {
    padding-top: 10px;
    text-align: center;
}

/* Global Animation */
.quick-animate {
    animation: fadeIn 0.2s ease-out;
}

/* Contact Buttons */
.contact-buttons {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    padding-bottom: 10px;
}

.book-session-header-btn {
    margin-top: 1rem;
    width: auto;
}

/* Navigation */
.global-header-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}


.navbar {
    text-align: center;
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    display: none;
    width: 100%;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.navbar.is-open {
    display: block;
    max-height: 300px;
    opacity: 1;
    padding: 1rem 0;
    background-color: var(--secondary-color);
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 99;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-direction: column;
    gap: 5px;
    display: flex;
    justify-content: center;
}

.navbar li a, .nav-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: block;
    position: relative;
}

.navbar li a:hover, .nav-link:hover {
    background-color: var(--surface);
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--accent-color);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
}

/* Social Media Buttons */
/* Style for LinkedIn, Email + GitHub */

/* Cards */
.skill-category, .job, .certs, .project-card, .testimonial-card, .ai-tool-box {
    background: var(--surface);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    padding: 1.5rem;
}

.skill-category:hover, .job:hover, .certs:hover, .project-card:hover, .testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
}

/* Expand button*/
.expand-btn {
    background: none;
    border: none;
    color: var(--accent-color); 
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s ease;
    padding: 5px;
}

.expand-btn.expanded[aria-expanded="true"] {
    transform: rotate(180deg);
}

/* Forms */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 155, 0.1);
}


/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
    z-index: 999;
    filter: opacity(0.85);

    /* styles for fading */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.back-to-top:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-1px);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Modals */
.project-modal, .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--surface);
    border-radius: 8px;
    padding: 2rem;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
}

/* Tags and Labels */
.tech-tag, .tech-highlight {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 2px;
    font-weight: 500;
}

.tech-highlight {
    background: none;
    color: var(--accent-secondary);
    padding: 0;
}

/* Status Indicators */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-indicator.available {
    background-color: #10B981;
}

.status-indicator.busy {
    background-color: #F59E0B;
}

.status-indicator.offline {
    background-color: #EF4444;
}

/* Ensure mobile nav is hidden by default */
.main-navigation .nav-container {
    display: none;
}