/* =========================================================================
   MEDGERMANY MODERN UI OVERHAUL
   ========================================================================= */

/* --- Typography & Spacing --- */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .hero h1, .guide-hero h1 {
    font-family: 'Inter', 'Montserrat', sans-serif !important;
    letter-spacing: -0.02em;
}

/* --- Glassmorphism Header --- */
.glass-header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.fixed-top + * {
    /* Offset body content since header is fixed */
    padding-top: 80px;
}

/* --- Guide Hero Section --- */
.guide-hero-modern {
    position: relative;
    background: #1b3943;
    color: #ffffff;
    padding: 100px 0 80px;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(13, 41, 83, 0.15);
}

.guide-hero-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 60%);
    animation: rotateGradient 20s linear infinite;
    pointer-events: none;
}

@keyframes rotateGradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.guide-hero-modern h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #ffffff !important;
    position: relative;
    z-index: 2;
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.guide-hero-modern .subtitle {
    font-size: 20px;
    color: #e68c12;
    opacity: 1;
    max-width: 650px;
    position: relative;
    z-index: 2;
    font-weight: 400;
    line-height: 1.6;
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

@keyframes slideUpFade {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* --- Guide Cards (Hub & Spoke) --- */
.guide-card-modern {
    display: block;
    padding: 24px 20px;
    background: #ffffff;
    border-radius: 16px;
    text-decoration: none;
    color: #334155;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.guide-card-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #14b8a6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.guide-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
    color: #0f172a;
}

.guide-card-modern:hover::after {
    opacity: 1;
}

.guide-card-modern strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.guide-card-modern small {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    display: block;
}

/* --- Smooth FAQ Accordion --- */
.faq-modern-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.faq-modern-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border-color: #cbd5e1;
}

.faq-modern-question {
    padding: 20px 24px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: #0f172a;
    background: transparent;
    user-select: none;
}

.faq-modern-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    padding: 0 24px;
    color: #475569;
    line-height: 1.7;
    background: #fafaf9;
    border-radius: 0 0 12px 12px;
}

.faq-modern-answer.active {
    max-height: 500px;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
}

/* --- Premium CTA Block --- */
.guide-cta-premium {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #dbeafe;
    border-radius: 20px;
    padding: 40px;
    margin: 60px 0;
    text-align: center;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.05);
    position: relative;
    overflow: hidden;
}

.guide-cta-premium::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.btn-cta-pulse {
    display: inline-block;
    background: #2563eb;
    color: #ffffff;
    padding: 14px 36px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    margin-top: 20px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.39);
    transition: all 0.3s ease;
    position: relative;
}

.btn-cta-pulse:hover {
    background: #1d4ed8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* --- Author Dashboard & Pills --- */
.author-dashboard {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    flex-wrap: wrap;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 0 0 4px #eff6ff;
}

.explore-pill {
    display: inline-block;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin: 5px 5px 10px 0;
    transition: all 0.3s ease;
}

.explore-pill:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

/* --- Floating Labels for Forms --- */
.form-floating-custom {
    position: relative;
    margin-bottom: 20px;
}

.form-floating-custom input,
.form-floating-custom select,
.form-floating-custom textarea {
    width: 100%;
    padding: 18px 16px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font-size: 16px;
    color: #0f172a;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-floating-custom select {
    padding: 14px 16px;
}

.form-floating-custom input:focus,
.form-floating-custom textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-floating-custom label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    font-size: 16px;
    color: #64748b;
    pointer-events: none;
    transition: all 0.2s ease-out;
    background: #ffffff;
    padding: 0 4px;
}

.form-floating-custom textarea ~ label {
    top: 24px;
}

.form-floating-custom input:focus ~ label,
.form-floating-custom input:not(:placeholder-shown) ~ label,
.form-floating-custom textarea:focus ~ label,
.form-floating-custom textarea:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 12px;
    color: #2563eb;
    font-weight: 600;
}

/* --- Content Styling --- */
.guide-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 30px 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.guide-content th {
    background: #f8fafc;
    padding: 16px 20px;
    font-weight: 700;
    color: #0f172a;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.guide-content td {
    padding: 16px 20px;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
}

.guide-content tr:last-child td {
    border-bottom: none;
}

.guide-content tr:hover td {
    background: #fafaf9;
}


/* --- Phase 3: Premium Micro-Interactions --- */
html { scroll-behavior: smooth; }
::selection { background-color: #e68c12; color: #fff; }
::-moz-selection { background-color: #e68c12; color: #fff; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #0f242e; }
::-webkit-scrollbar-thumb { background: #1b3943; border-radius: 6px; border: 3px solid #0f242e; }
::-webkit-scrollbar-thumb:hover { background: #e68c12; }
.btn-submit { transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important; }
.btn-submit:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(230, 140, 18, 0.4) !important; filter: brightness(1.1); }
.card, .guide-card-modern { transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important; }
.card:hover, .guide-card-modern:hover { transform: translateY(-6px); box-shadow: 0 15px 35px rgba(13, 41, 83, 0.15) !important; border-color: rgba(230, 140, 18, 0.3); }



/* --- Phase 4: Mobile Rescue Plan --- */
@media (max-width: 768px) {
    .guide-hero-modern { padding: 45px 15px 30px !important; border-radius: 0 0 24px 24px !important; text-align: center; }
    .guide-hero-modern h1 { font-size: 28px !important; line-height: 1.3 !important; }
    .guide-hero-modern .subtitle { font-size: 16px !important; margin: 0 auto; }
    .guide-cta-premium { padding: 24px 15px !important; margin: 30px 0 !important; }
    .author-dashboard { flex-direction: column !important; text-align: center !important; gap: 10px !important; padding: 24px 15px !important; }
    .fixed-top + * { padding-top: 60px !important; }
    .mobile-carousel-caption { position: absolute; bottom: 10px !important; padding: 15px !important; background: rgba(27, 57, 67, 0.75); border-radius: 12px; width: 90% !important; left: 5% !important; right: 5% !important; text-align: center; backdrop-filter: blur(5px); display: block !important; }
    .mobile-carousel-caption h5 { font-size: 16px !important; margin-bottom: 5px !important; color: #fff !important; }
    .mobile-carousel-caption p { font-size: 12px !important; margin: 0 auto 10px auto !important; width: 100% !important; color: #eee !important; }
    .mobile-carousel-caption .btn-submit { padding: 8px 16px !important; font-size: 13px !important; margin-bottom: 0 !important; }
}

