/* ================================================
   SkillBridge - Professional Marketplace Website
   Modern, responsive design with accessibility
   ================================================ */

/* ================================================
   COLOR PALETTE & ROOT VARIABLES
   ================================================ */
:root {
    /* Primary Colors */
    --primary-color: #1e5a96;
    --primary-dark: #0f3a5f;
    --primary-light: #4a7ba7;
    
    /* Secondary Colors */
    --secondary-color: #f39c12;
    --secondary-dark: #d68910;
    --secondary-light: #f5b041;
    
    /* Neutral Colors */
    --dark: #2c3e50;
    --gray-dark: #34495e;
    --gray-medium: #7f8c8d;
    --gray-light: #ecf0f1;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    
    /* Success/Error Colors */
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

/* ================================================
   GLOBAL STYLES
   ================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* ================================================
   TYPOGRAPHY
   ================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
}

/* Accessibility - Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
    border-radius: var(--radius-sm);
}

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

/* ================================================
   NAVIGATION BAR
   ================================================ */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-light);
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    transition: transform var(--transition-base);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand i {
    color: var(--secondary-color);
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin-left: var(--spacing-md);
    color: var(--gray-dark) !important;
    position: relative;
    transition: color var(--transition-base);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-base);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* ================================================
   PAGE CONTENT STRUCTURE
   ================================================ */
.page-content {
    display: none;
    animation: fadeIn var(--transition-base);
}

.page-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 5rem 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 600px;
    height: 600px;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.hero-cta {
    position: relative;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    margin: 0 auto;
}

/* ================================================
   SECTION STYLING
   ================================================ */
.section-title {
    font-size: 2.5rem;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* How It Works Section */
.how-it-works {
    background-color: var(--light-bg);
    padding: var(--spacing-xxl) 0 !important;
}

.step-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border-top: 4px solid var(--primary-color);
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.step-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: var(--dark);
}

.step-description {
    color: var(--gray-medium);
    margin-bottom: 0;
}

/* Popular Trades Section */
.popular-trades {
    padding: var(--spacing-xxl) 0 !important;
}

.trade-card {
    display: block;
    padding: var(--spacing-xl);
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-base);
    text-decoration: none;
    color: var(--dark);
    position: relative;
    overflow: hidden;
}

.trade-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(243, 156, 18, 0.1), transparent);
    transition: left var(--transition-base);
    z-index: 0;
}

.trade-card:hover::before {
    left: 100%;
}

.trade-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.trade-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    transition: color var(--transition-base);
    position: relative;
    z-index: 1;
}

.trade-card:hover .trade-icon {
    color: var(--secondary-color);
}

.trade-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Testimonials Section */
.testimonials {
    background-color: var(--light-bg);
    padding: var(--spacing-xxl) 0 !important;
}

.testimonial-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border-left: 4px solid var(--secondary-color);
}

.testimonial-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.stars {
    color: var(--warning);
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.testimonial-text {
    color: var(--gray-dark);
    font-style: italic;
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.testimonial-author {
    color: var(--gray-medium);
    font-size: 0.95rem;
    margin: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: var(--spacing-xxl) 0 !important;
    border-radius: var(--radius-lg);
    margin: var(--spacing-xxl);
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: var(--spacing-lg);
}

.cta-section .lead {
    color: rgba(255, 255, 255, 0.95);
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ================================================
   FORMS & INPUTS
   ================================================ */
.form-section {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-section-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--gray-light);
    padding-bottom: var(--spacing-lg);
}

.form-label {
    color: var(--dark);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.form-control,
.form-select {
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    font-size: 1rem;
    transition: all var(--transition-base);
    font-family: inherit;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.1);
    outline: none;
}

.form-check-input {
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    cursor: pointer;
    margin-left: var(--spacing-sm);
    margin-bottom: 0;
    user-select: none;
}

/* Filter Section */
.filter-section {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.filter-title {
    color: var(--dark);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: var(--spacing-md);
}

.rating-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* ================================================
   PROFESSIONAL CARDS (Find a Pro)
   ================================================ */
.professional-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.professional-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.professional-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background-color: var(--gray-light);
}

.professional-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.professional-card:hover .professional-image img {
    transform: scale(1.05);
}

.badge-featured {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background-color: var(--success);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 10;
}

.professional-info {
    padding: var(--spacing-lg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.professional-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--spacing-sm);
}

.professional-trade {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
}

.professional-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.stars {
    color: var(--warning);
    font-size: 1rem;
}

.rating-value {
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.professional-description {
    color: var(--gray-medium);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.professional-price {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--gray-light);
}

.price-label {
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
}

/* ================================================
   PAGE TITLES
   ================================================ */
.page-title {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
    background-color: var(--dark);
    color: var(--white);
    padding: var(--spacing-xxl) 0;
    margin-top: auto;
}

.footer h5,
.footer h6 {
    color: var(--white);
    margin-bottom: var(--spacing-lg);
}

.footer p {
    margin-bottom: var(--spacing-md);
}

.footer-link {
    color: var(--gray-light);
    text-decoration: none;
    transition: color var(--transition-base);
    display: block;
    margin-bottom: var(--spacing-sm);
}

.footer-link:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding-top: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

/* ================================================
   CONTACT SECTION
   ================================================ */
.contact-info {
    text-align: center;
}

.contact-info i {
    font-size: 2rem;
    color: var(--primary-color);
}

.contact-info h5 {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    color: var(--dark);
}

.contact-info a {
    color: var(--primary-color);
    font-weight: 600;
}

/* ================================================
   MODAL STYLES
   ================================================ */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 2px solid var(--gray-light);
}

.modal-title {
    color: var(--white);
    font-weight: 700;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

/* Tablets (768px and up) */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .navbar-nav .nav-link {
        margin-left: var(--spacing-md);
        font-size: 0.95rem;
    }
    
    .cta-section {
        padding: var(--spacing-xl) 0 !important;
        text-align: center;
    }
    
    .cta-section .col-lg-6:last-child {
        margin-top: var(--spacing-lg);
        text-align: center;
    }
    
    .step-card {
        padding: var(--spacing-lg);
    }
    
    .hero-section {
        min-height: 50vh;
        padding: 3rem 0;
    }
    
    .testimonial-card {
        margin-bottom: var(--spacing-lg);
    }
}

/* Mobile (576px and below) */
@media (max-width: 576px) {
    :root {
        font-size: 15px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .hero-section {
        min-height: 45vh;
        padding: 2rem 0;
    }
    
    .step-card {
        padding: var(--spacing-lg);
    }
    
    .form-section {
        padding: var(--spacing-lg);
    }
    
    .professional-card {
        margin-bottom: var(--spacing-lg);
    }
    
    .professional-image {
        height: 200px;
    }
    
    .cta-section {
        padding: var(--spacing-lg) 0 !important;
        margin: var(--spacing-lg) !important;
    }
    
    .btn-lg {
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }
    
    .footer {
        padding: var(--spacing-xl) 0;
    }
    
    .filter-section {
        margin-bottom: var(--spacing-lg);
        position: static !important;
    }
}

/* Small phones (max 360px) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .professional-image {
        height: 180px;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* ================================================
   PRINT STYLES
   ================================================ */
@media print {
    body {
        background-color: var(--white);
    }
    
    .navbar,
    .footer,
    .btn {
        display: none;
    }
    
    .page-content:not(.active) {
        display: none !important;
    }
}

/* ================================================
   ACCESSIBILITY & REDUCED MOTION
   ================================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
    .btn-primary {
        border: 2px solid var(--dark);
    }
    
    .form-control,
    .form-select {
        border: 3px solid var(--dark);
    }
}

/* ================================================
   UTILITIES & HELPER CLASSES
   ================================================ */
.container-lg {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.text-center {
    text-align: center;
}

.text-lg-end {
    text-align: end;
}

.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: calc(var(--spacing-lg) * 1.5); }
.mb-5 { margin-bottom: var(--spacing-xxl); }

.mt-3 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xxl); }

.py-5 { padding: var(--spacing-xxl) 0 !important; }

.bg-light {
    background-color: var(--light-bg) !important;
}

.text-muted {
    color: var(--gray-medium);
}

.text-white {
    color: var(--white);
}

.text-dark {
    color: var(--dark);
}

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.fw-bold {
    font-weight: 700;
}

.fw-semibold {
    font-weight: 600;
}

.border-top {
    border-top: 1px solid var(--gray-light);
}

.rounded-3 {
    border-radius: var(--radius-lg);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.list-unstyled {
    list-style: none;
    padding: 0;
}

.sticky-lg-top {
    position: sticky;
}

/* ================================================
   FOCUS STYLES FOR ACCESSIBILITY
   ================================================ */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ================================================
   LOADING ANIMATION
   ================================================ */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-light) 25%, var(--white) 50%, var(--gray-light) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}
