/**
 * Internal Link Module CSS
 * Modern, Responsive, SEO-friendly Design
 * Container-based, Mobile-first approach
 */

/* ===== BASE STYLES ===== */
.internal-link-module {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    border: 1px solid #e8edf5; 
    box-shadow: 0 2px 12px rgba(0, 9, 91, 0.08);
    overflow: hidden;
}

/* HEADER - Modern Design */
.internal-link-header {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 3px solid #00095B;
    position: relative;
}

.internal-link-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #00095B, transparent);
    animation: expandLine 0.6s ease-out forwards;
}

.internal-link-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #00095B; 
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.internal-link-header h3::before {
    content: '🔗';
    font-size: 24px;
    animation: bounce 0.8s ease-in-out 2;
}

/* CONTAINER */
.internal-link-container {
    width: 100%;
}

/* ===== CATEGORIES GRID ===== */
.internal-link-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

/* CATEGORY CARD */
.internal-link-category {
    padding: 20px;
    background: #ffffff;
    border: 1.5px solid #e8edf5;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.internal-link-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.internal-link-category:hover::before {
    left: 100%;
}

.internal-link-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 9, 91, 0.15);
    border-color: #00095B;
}

/* CATEGORY TITLE */
.internal-link-category-title {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 700;
    color: #00095B;
    text-transform: capitalize;
    position: relative;
    padding-bottom: 8px;
}

.internal-link-category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #00095B;
    transition: width 0.3s ease;
}

.internal-link-category:hover .internal-link-category-title::after {
    width: 100%;
}

/* ===== LINK LIST ===== */
.internal-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.internal-link-item {
    margin: 10px 0;
    padding: 0;
    animation: fadeInUp 0.5s ease-out backwards;
}

.internal-link-item:nth-child(1) { animation-delay: 0.1s; }
.internal-link-item:nth-child(2) { animation-delay: 0.2s; }
.internal-link-item:nth-child(3) { animation-delay: 0.3s; }

.internal-link-item a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #00095B;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.2s ease;
    word-break: break-word;
    border-radius: 6px;
    background: transparent;
    position: relative;
}

.internal-link-item a::before {
    content: '→';
    margin-right: 8px;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.2s ease;
    color: #00095B;
}

.internal-link-item a:hover {
    background: rgba(0, 9, 91, 0.05);
    padding-left: 20px;
    color: #0d0ba0;
}

.internal-link-item a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.internal-link-item a:active {
    color: #000;
    transform: scale(0.98);
}

/* ===== BUTTON CONTAINER ===== */
.internal-link-button-container {
    display: flex;
    justify-content: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e8edf5;
}

/* ===== TOGGLE BUTTON - Modern Styling ===== */
.internal-link-toggle-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #00095B 0%, #1a0f8c 100%);
    color: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    outline: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 9, 91, 0.2);
}

/*.internal-link-toggle-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.5s, height 0.5s;
}*/

.internal-link-toggle-btn:hover::before {
    width: 300px;
    height: 300px;
}

.internal-link-toggle-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 9, 91, 0.3);
    background: linear-gradient(135deg, #1a0f8c 0%, #00095B 100%);
}

.internal-link-toggle-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 9, 91, 0.2);
}

.internal-link-toggle-btn:focus-visible {
    outline: 2px solid #00095B;
    outline-offset: 3px;
}

/* ===== NOSCRIPT CONTENT (SEO) ===== */
/* <noscript> etiketi JS devre dışıyken içeriği zaten gösterir.
   display:none KULLANMA - SEO crawlability'yi bozar. */
.internal-link-noscript {
    margin-top: 24px;
    padding: 20px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.internal-link-noscript h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: #00095B;
}

.internal-link-category-noscript {
    margin-bottom: 18px;
}

.internal-link-category-noscript h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.internal-link-category-noscript ul {
    margin: 0;
    padding: 0 0 0 24px;
}

.internal-link-category-noscript li {
    margin: 6px 0;
    font-size: 13px;
    line-height: 1.6;
}

.internal-link-category-noscript a {
    color: #00095B;
    text-decoration: none;
    transition: color 0.2s ease;
}

.internal-link-category-noscript a:hover {
    text-decoration: underline;
    color: #0d0ba0;
}

/* ===== EXPANDED STATE ===== */
.internal-link-category-expanded {
    display: none;
}

.internal-link-item-expanded {
    display: none;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes expandLine {
    from {
        width: 0;
    }
    to {
        width: 50px;
    }
}


/* ===== TABLET (768px - 991px) ===== */
@media (max-width: 991px) {
    .internal-link-module {
        padding: 24px;
        margin: 30px 0;
    }

    .internal-link-header h3 {
        font-size: 18px;
    }

    .internal-link-categories {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 18px;
    }

    .internal-link-category {
        padding: 16px;
    }

    .internal-link-category-title {
        font-size: 14px;
    }

    .internal-link-item a {
        font-size: 13px;
        padding: 6px 10px;
    }

    .internal-link-toggle-btn {
        padding: 12px 28px;
        font-size: 13px;
    }
}

/* ===== MOBILE (< 768px) ===== */
@media (max-width: 767px) {
    .internal-link-module {
        padding: 16px;
        margin: 20px -16px;
        border-left: none;
        border-right: none;
        border-radius: 0;
        background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
        box-shadow: 0 2px 8px rgba(0, 9, 91, 0.06);
    }

    .internal-link-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom-width: 2px;
    }

    .internal-link-header h3 {
        font-size: 16px;
        gap: 8px;
    }

    .internal-link-header h3::before {
        font-size: 18px;
    }

    .internal-link-categories {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .internal-link-category {
        padding: 14px;
        border-radius: 8px;
    }

    .internal-link-category-title {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .internal-link-item a {
        font-size: 12px;
        padding: 6px 10px;
    }

    .internal-link-toggle-btn {
        padding: 11px 24px;
        font-size: 12px;
        width: 100%;
        max-width: 300px;
    }

    .internal-link-button-container {
        margin-top: 20px;
        padding-top: 16px;
    }
}

/* ===== SMALL MOBILE (< 480px) ===== */
@media (max-width: 480px) {
    .internal-link-module {
        padding: 12px;
        margin: 16px -12px;
    }

    .internal-link-header h3 {
        font-size: 14px;
    }

    .internal-link-categories {
        gap: 10px;
    }

    .internal-link-category {
        padding: 12px;
    }

    .internal-link-category-title {
        font-size: 12px;
    }

    .internal-link-item a {
        font-size: 11px;
        padding: 5px 8px;
    }

    .internal-link-toggle-btn {
        padding: 10px 20px;
        font-size: 11px;
    }
}

/* ===== ACCESSIBILITY ===== */
.internal-link-item a:focus-visible {
    outline: 2px solid #00095B;
    outline-offset: 2px;
    border-radius: 4px;
} 
