/* Visual Enhancements - Typography, Colors, Animations, Hover Effects */

/* ========================================
   TYPOGRAPHY IMPROVEMENTS
   ======================================== */

/* Better font hierarchy */
h1, .h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h2, .h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
}

h3, .h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1rem;
}

h4, .h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
}

h5, .h5 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5;
}

h6, .h6 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lead {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    font-weight: 400;
    line-height: 1.6;
    color: var(--bs-secondary-color);
}

/* Section titles with underline accent */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
    border-radius: 2px;
}

/* ========================================
   CARD ENHANCEMENTS
   ======================================== */

.card {
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="dark"] .card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
}

.card-body {
    padding: 2rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--bs-emphasis-color);
}

.card-text {
    line-height: 1.6;
    color: var(--bs-secondary-color);
}

/* Card hover effects with icon animation */
.card .display-4,
.card .display-5,
.card .display-6 {
    transition: all 0.3s ease;
}

.card:hover .display-4,
.card:hover .display-5,
.card:hover .display-6 {
    transform: scale(1.1) rotate(5deg);
    color: var(--bs-primary);
}

/* ========================================
   BADGE/PILL IMPROVEMENTS
   ======================================== */

.badge {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Modern color palette for badges */
.badge.bg-primary {
    background: linear-gradient(135deg, #2160d1 0%, #3b82f6 100%) !important;
    border-color: rgba(255, 255, 255, 0.1);
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #a5b4fc 0%, #c7d2fe 100%) !important;
    color: #1e293b !important;
    border-color: rgba(0, 0, 0, 0.1);
}

.badge.bg-success {
    background: linear-gradient(135deg, #3b9165 0%, #10b981 100%) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #3987ab 0%, #06b6d4 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #c99a2e 0%, #f59e0b 100%) !important;
    color: #1e293b !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #b84545 0%, #ef4444 100%) !important;
}

/* Badge groups with proper spacing */
.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ========================================
   BUTTON ENHANCEMENTS
   ======================================== */

.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: 1rem;
}

/* ========================================
   NUMBERED LIST ENHANCEMENTS
   ======================================== */

.numbered-step {
    position: relative;
    padding-left: 4rem;
}

.numbered-step .rounded-circle {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(33, 96, 209, 0.2);
    transition: all 0.3s ease;
}

.numbered-step:hover .rounded-circle {
    transform: scale(1.1) rotate(360deg);
    box-shadow: 0 8px 20px rgba(33, 96, 209, 0.3);
}

/* ========================================
   STATS/METRICS DISPLAY
   ======================================== */

.stat-display {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.stat-display:hover {
    background: var(--bs-tertiary-bg);
    transform: translateY(-4px);
}

.stat-display .display-4 {
    font-weight: 800;
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

/* ========================================
   ACCORDION IMPROVEMENTS
   ======================================== */

.accordion-button {
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
}

.accordion-button:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(33, 96, 209, 0.25);
}

.accordion-body {
    padding: 1.5rem;
    line-height: 1.6;
}

/* ========================================
   ALERT ENHANCEMENTS
   ======================================== */

.alert {
    border-radius: 1rem;
    border-width: 0;
    border-left-width: 4px;
    padding: 1.5rem;
}

.alert-heading {
    font-weight: 600;
}

.alert i.bi {
    font-size: 1.5rem;
    vertical-align: middle;
}

/* ========================================
   ICON ENHANCEMENTS
   ======================================== */

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.icon-wrapper:hover {
    background: var(--bs-primary);
    color: white;
    transform: rotate(5deg) scale(1.1);
}

/* ========================================
   LINK IMPROVEMENTS
   ======================================== */

a {
    text-decoration: none;
    color: var(--bs-primary);
    transition: all 0.2s ease;
}

a:hover {
    color: var(--bs-primary);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* ========================================
   BORDER UTILITIES
   ======================================== */

.border-gradient {
    border: 2px solid transparent;
    background-image: 
        linear-gradient(var(--bs-body-bg), var(--bs-body-bg)),
        linear-gradient(135deg, var(--bs-primary), var(--bs-secondary));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* ========================================
   TEXT GRADIENT
   ======================================== */

.text-gradient {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   SHADOW UTILITIES
   ======================================== */

.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-medium {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-strong {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] .shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .shadow-medium {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .shadow-strong {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

/* ========================================
   ANIMATION UTILITIES
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   RESPONSIVE SPACING
   ======================================== */

@media (max-width: 767.98px) {
    .card-body {
        padding: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

/* ========================================
   CARD LAYOUT UTILITIES
   ======================================== */

/* Ensure consistent card heights in grid layouts */
.card-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .card-grid {
        gap: 2rem;
    }
}

.card-grid .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-grid .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Auto-grow card content to fill available space */
.card-body > *:last-child {
    margin-bottom: 0;
}

/* Consistent card header heights */
.card-header {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

/* Equal height columns in rows */
[class*="row"] > [class*="col"] {
    display: flex;
    flex-direction: column;
}

[class*="row"] > [class*="col"] > .card,
[class*="row"] > [class*="col"] > .h-100 {
    flex: 1;
}

/* ========================================
   THEME-AWARE COMPONENTS
   ======================================== */

/* Theme-aware card backgrounds */
.card.bg-light {
    background-color: rgba(248, 249, 250, 1) !important;
}

[data-bs-theme="dark"] .card.bg-light {
    background-color: rgba(33, 37, 41, 1) !important;
    color: rgba(248, 249, 250, 0.9);
}

[data-bs-theme="dark"] .card.bg-body {
    background-color: rgba(33, 37, 41, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Theme-aware text colors */
[data-bs-theme="dark"] .text-muted {
    color: rgba(248, 249, 250, 0.6) !important;
}

[data-bs-theme="dark"] .card-text.text-muted {
    color: rgba(248, 249, 250, 0.7) !important;
}

/* ========================================
   METHODOLOGY SECTION ALIGNMENT
   ======================================== */

/* Numbered steps with left-aligned text */
.numbered-step {
    text-align: center;
}

.numbered-step h4,
.numbered-step h5,
.numbered-step p {
    text-align: center;
}

/* Left-aligned methodology lists */
.methodology-list {
    text-align: left;
}

.methodology-list .d-flex {
    text-align: left;
}

/* ========================================
   TECH STACK BADGE ALIGNMENT
   ======================================== */

/* Center-aligned tech stack sections */
.tech-stack-section {
    text-align: center;
}

.tech-stack-section h4,
.tech-stack-section h5 {
    text-align: center;
}

.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

/* Override for left-aligned badge groups */
.badge-group.text-start {
    justify-content: flex-start;
}

/* ========================================
   SIDEBAR CARDS (WHAT YOU GET, WHY CUSTOM)
   ======================================== */

/* Theme-aware sidebar cards */
.sidebar-card {
    background-color: rgba(248, 249, 250, 1);
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 1rem;
    padding: 2rem;
}

[data-bs-theme="dark"] .sidebar-card {
    background-color: rgba(33, 37, 41, 1);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .sidebar-card h3,
[data-bs-theme="dark"] .sidebar-card h4,
[data-bs-theme="dark"] .sidebar-card h5 {
    color: rgba(248, 249, 250, 0.95);
}

[data-bs-theme="dark"] .sidebar-card p,
[data-bs-theme="dark"] .sidebar-card li {
    color: rgba(248, 249, 250, 0.8);
}

/* ========================================
   INTERACTIVE BUTTON ENHANCEMENTS
   ======================================== */

.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.98);
}

/* ========================================
   FOCUS STATES FOR ACCESSIBILITY
   ======================================== */

.card:focus-visible,
.btn:focus-visible,
a:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 3px;
}

[data-bs-theme="dark"] .card:focus-visible,
[data-bs-theme="dark"] .btn:focus-visible,
[data-bs-theme="dark"] a:focus-visible {
    outline-color: var(--bs-secondary);
}

/* ========================================
   REDUCED MOTION PREFERENCES
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
