:root {
    --primary-color: #3c9f70;
    --secondary-color: #2c7a52;
    --light-bg: #f4f9f4;
    --dark-text: #333333;
    --light-text: #ffffff;
    --border-radius: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
    padding-top: 20px;
}

.container {
    max-width: 800px;
}

.hero-section {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 60px 0;
    text-align: center;
}

.hero-section h1 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.book-cover {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out;
}

.book-cover:hover {
    transform: scale(1.05);
}

.btn-primary {
    background-color: var(--light-text);
    color: var(--primary-color);
    border: 2px solid var(--light-text);
    font-weight: bold;
    padding: 12px 24px;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--light-text);
    border-color: var(--light-text);
}

.btn-outline-light {
    padding: 12px 24px;
    font-weight: bold;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: var(--light-text) !important;
}

.custom-btn {
    display: block;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(60, 159, 112, 0.2);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    color: var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(60, 159, 112, 0.1);
    backdrop-filter: blur(10px);
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.custom-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(60, 159, 112, 0.05), rgba(60, 159, 112, 0.02));
    border-radius: 14px;
    z-index: 1;
}

.custom-btn>* {
    position: relative;
    z-index: 2;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(60, 159, 112, 0.25);
}

.primary-btn::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(60, 159, 112, 0.3);
}

.secondary-btn:hover,
.custom-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(60, 159, 112, 0.2);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 1);
}

.primary-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(60, 159, 112, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.btn-icon {
    margin-bottom: 15px;
}

.btn-icon i {
    font-size: 2.2rem;
    color: inherit;
}

.btn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.btn-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.btn-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

.test-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
    max-width: 100%;
}

.test-buttons .btn {
    background-color: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 15px;
    font-weight: bold;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.test-buttons .btn:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-body ol {
    padding-left: 20px;
}

.modal-body li {
    padding: 5px 0;
    font-size: 1.1rem;
}

.modal-footer .btn-secondary {
    background-color: var(--secondary-color);
    border: none;
}

.about-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fdf9 100%);
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(60, 159, 112, 0.03), rgba(60, 159, 112, 0.01));
    border-radius: 50%;
    transform: translate(50%, -50%);
    z-index: 1;
}

.about-section .container {
    position: relative;
    z-index: 2;
}

.about-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
}

.about-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.about-section .lead {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1.8rem;
    font-weight: 500;
    line-height: 1.6;
}

.about-section p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1.5rem;
    text-align: justify;
    hyphens: auto;
}

.about-section .col-lg-8 {
    padding-left: 2rem;
}

.author-photo {
    max-width: 280px;
    width: 100%;
    height: 280px;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 20px 40px rgba(60, 159, 112, 0.2);
    transition: all 0.4s ease;
    position: relative;
    margin: 0 auto;
    display: block;
}

.author-photo::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: linear-gradient(135deg, rgba(60, 159, 112, 0.08), rgba(60, 159, 112, 0.03));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: all 0.4s ease;
}

.author-photo:hover {
    transform: scale(1.03) translateY(-5px);
    box-shadow: 0 25px 50px rgba(60, 159, 112, 0.25);
    border-color: var(--secondary-color);
}

.author-photo:hover::before {
    opacity: 1;
    transform: scale(1.1);
}

/* Responsive improvements */
@media (max-width: 991.98px) {
    .about-section {
        padding: 60px 0;
    }

    .about-section .col-lg-4 {
        margin-bottom: 3rem;
    }

    .about-section .col-lg-8 {
        padding-left: 1rem;
        margin-top: 0;
    }

    .about-section h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .about-section h2 {
        text-align: center;
    }

    .author-photo {
        max-width: 220px;
        height: 220px;
    }
}

@media (max-width: 767.98px) {
    .about-section p {
        text-align: left;
        font-size: 1rem;
    }

    .about-section .lead {
        font-size: 1.1rem;
        text-align: center;
    }

    .author-photo {
        max-width: 180px;
        height: 180px;
    }

    .about-section .col-lg-4 {
        margin-bottom: 2rem;
    }
}

@media (max-width: 575.98px) {
    .author-photo {
        max-width: 160px;
        height: 160px;
    }
}

.about-section .row.align-items-center {
    align-items: flex-start !important;
}

.about-section .col-lg-4 {
    padding-top: 0.5rem;
}

/* Modern ve minimal ünite-egzersiz yapısı */
.unit-container {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(60, 159, 112, 0.08);
    transition: all 0.2s ease;
    overflow: hidden;
    width: 100%;
}

.unit-container:hover {
    border-color: rgba(60, 159, 112, 0.2);
    box-shadow: 0 2px 20px rgba(60, 159, 112, 0.06);
    transform: translateY(-1px);
}

.unit-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
    padding: 24px 24px 20px 24px;
    position: relative;
    border-radius: 16px;
}

.unit-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    pointer-events: none;
}

.unit-title {
    margin: 0 0 16px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--light-text);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

.unit-exercises {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.exercise-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 20px;
    transition: all 0.2s ease;
    flex: none;
    white-space: nowrap;
    min-width: fit-content;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.exercise-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    color: var(--primary-color);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.exercise-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Modal güncellemeleri - minimal tasarım */
.answer-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(60, 159, 112, 0.15);
}

.answer-header h6 {
    margin: 0;
    font-weight: 500;
    color: rgba(60, 159, 112, 0.8);
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.answer-list {
    padding-left: 0;
    list-style: none;
}

.answer-list li {
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(60, 159, 112, 0.02);
    border: 1px solid rgba(60, 159, 112, 0.08);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.15s ease;
    position: relative;
    padding-left: 40px;
}

.answer-list li::before {
    content: counter(list-counter);
    counter-increment: list-counter;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.answer-list {
    counter-reset: list-counter;
}

.answer-list li:hover {
    background-color: rgba(60, 159, 112, 0.06);
    border-color: rgba(60, 159, 112, 0.2);
    transform: translateY(-1px);
}

.answer-list li:last-child {
    margin-bottom: 0;
}

/* Responsive tasarım güncellemeleri */
@media (max-width: 768px) {
    .test-buttons {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .unit-container {
        border-radius: 14px;
    }

    .unit-header {
        padding: 20px 20px 18px 20px;
        border-radius: 14px;
    }

    .unit-exercises {
        gap: 6px;
    }

    .unit-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .exercise-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
        border-radius: 18px;
    }
}

@media (max-width: 576px) {
    .test-buttons {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 20px;
    }

    .unit-container {
        border-radius: 12px;
    }

    .unit-header {
        padding: 18px 18px 16px 18px;
        border-radius: 12px;
    }

    .unit-exercises {
        gap: 6px;
    }

    .unit-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .exercise-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        border-radius: 16px;
    }
}

/* Gallery Modal Styles */
.gallery-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gallery-main {
    position: relative;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50vh;
    max-height: 50vh;
}

.gallery-main img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

.gallery-nav i {
    font-size: 1.2rem;
}

.gallery-thumbnails {
    padding: 20px;
    background-color: white;
}

.thumbnails-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    max-height: 120px;
    overflow-y: auto;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    opacity: 0.7;
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(60, 159, 112, 0.3);
}

.thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
    box-shadow: 0 4px 15px rgba(60, 159, 112, 0.4);
}

.gallery-counter {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: auto;
}

#galleryModal .modal-dialog {
    max-width: 85%;
    width: 80vw;
    max-height: 85vh;
}

#galleryModal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 85vh;
    overflow: hidden;
}

#galleryModal .modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px 30px;
}

#galleryModal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 30px;
    display: flex;
    align-items: center;
}

/* Mobile responsiveness for gallery */
@media (max-width: 768px) {
    .gallery-main {
        height: 45vh;
        max-height: 45vh;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
    }

    .gallery-nav.prev {
        left: 10px;
    }

    .gallery-nav.next {
        right: 10px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .thumbnails-container {
        gap: 10px;
        max-height: 80px;
    }

    #galleryModal .modal-dialog {
        max-width: 90%;
        width: 90vw;
        margin: 10px auto;
        max-height: 80vh;
    }

    #galleryModal .modal-header,
    #galleryModal .modal-footer {
        padding: 15px 20px;
    }
}

@media (max-width: 576px) {
    .gallery-main {
        height: 40vh;
        max-height: 40vh;
    }

    .thumbnail {
        width: 50px;
        height: 50px;
    }

    .thumbnails-container {
        gap: 8px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    .gallery-thumbnails {
        padding: 15px;
    }
}