:root {
    --bg-gradient: linear-gradient(145deg, #091424 0%, #0f2138 45%, #17345a 100%);
    --card-bg: #12253d;
    --text-color: #d7e3f1;
    --accent: #74d6ff;
    --accent-gradient: linear-gradient(135deg, #4aa0e8 0%, #7be2ff 100%);
    --border-glow: rgba(116, 214, 255, 0.2);
    --border: rgba(175, 218, 255, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    background-color: #091424; /* Fallback */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 60px;
    background-attachment: fixed;
    margin: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

a { text-decoration: none; color: inherit; }

/* Header */
.site-header {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 20, 36, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-title {
    font-size: 1.2rem;
    font-weight: 600;
}
.btn-home {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 500;
    transition: opacity 0.2s;
}
.btn-home:hover { opacity: 0.8; }
.btn-lang {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--accent);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9em;
    font-weight: 500;
}
.btn-lang:hover { 
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}
.lang-code { font-weight: bold; font-size: 0.9em; }

/* Profile & Warning (Home) */
.profile-section { 
    text-align: center; 
    margin-bottom: 30px; 
    position: relative;
    padding-top: 20px;
}

.profile-header {
    margin-bottom: 20px;
}

.welcome-text {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 15px;
    /* Mobilde uzun metinlerin dışarı taşmasını/kötü kırılmasını önler */
    word-wrap: break-word; 
    padding: 0 10px;
}

/* Responsive */
@media (max-width: 480px) {
    .welcome-text {
        font-size: 1.3rem; /* Mobilde fontu küçülterek tek satıra/daha düzgün sığdırır */
    }
}

.profile-photo-container {
    position: relative;
    display: inline-block;
}

.profile-photo img { 
    border-radius: 12px; 
    width: 200px; 
    height: 320px;
    object-fit: cover;
    border: 2px solid var(--border-glow); 
    box-shadow: 0 4px 25px var(--border-glow); 
    display: block;
    margin: 0 auto;
}

.social-section {
    margin-bottom: 30px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--border-glow);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
}
.warning-section { text-align: center; }
.warning-icon { color: #ff3939; margin-bottom: 15px; }
.warning-list { list-style: none; margin-bottom: 20px; font-size: 1.1rem; }
.warning-list li { margin-bottom: 8px; }
.warning-list .highlight { color: var(--accent); font-weight: bold; }

.social-actions { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.social-item { position: relative; display: inline-block; } /* Wrapper for drag handle */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.btn:hover { 
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,255,136,0.2);
    opacity: 0.95;
}
.btn-whatsapp { background: var(--accent-gradient); color: #052614; }
.btn-telegram { background: #0088cc; color: #fff; }

/* Modules Grid (Default) */
.modules-grid { display: flex; flex-direction: column; gap: 15px; }

/* General Content Blocks in modules */
.content-blocks { display: flex; flex-direction: column; gap: 20px; }

/* Specific Grid for Product Cards within content-blocks */
div.content-blocks.product-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 15px; 
}

.product-card-wrapper {
    position: relative;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 10px 24px var(--border-glow);
}

.product-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.product-gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    touch-action: pan-y;
    cursor: grab;
}

.product-gallery-main.dragging {
    cursor: grabbing;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.gallery-prev {
    left: 8px;
}

.gallery-next {
    right: 8px;
}

.product-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-thumb {
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    padding: 0;
}

.gallery-thumb.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

.product-info {
    padding: 14px;
}

.product-info h3 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.35;
}

.product-info p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.5;
    font-size: 0.95rem;
    /* BYMSA Patch: Cok satirli aciklamalarda satir kirilimini koru, gereksiz girinti bosluklarini gosterme. */
    white-space: pre-line;
}

.product-price {
    margin-top: 10px;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.3;
}

.product-cta-row {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.product-cta-row .btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    gap: 10px;
}

.product-cta-row .btn svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.translation-table-card {
    grid-column: 1 / -1;
}

.translation-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.translation-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.translation-table thead th {
    text-align: left;
    padding: 12px 14px;
    color: #fff;
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.translation-table tbody td {
    padding: 12px 14px;
    color: #d1d5db;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
    white-space: nowrap;
}

.translation-table tbody tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    div.content-blocks.product-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    .translation-table {
        min-width: 460px;
    }

}

.module-wrapper { position: relative; }

.module-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}
.module-card:hover { 
    border-color: var(--accent); 
    box-shadow: 0 4px 24px var(--border-glow);
    transform: translateY(-2px); 
}
.module-card h3 { font-size: 1.2rem; margin-bottom: 0; color: #fff; }
.module-card p { display: none; } /* Hide subtitles in CSS as backup */
.module-card-icon { color: var(--accent); }

/* Module Detail Page */
.module-hero { text-align: center; margin-bottom: 40px; }
.neon-text { 
    font-size: 2.2rem; 
    color: #fff; 
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
    margin-bottom: 10px; 
}
.module-subtitle { color: #8b949e; font-size: 1.1rem; }

.content-blocks { display: flex; flex-direction: column; gap: 20px; }
.content-card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; color: #fff; }
.content-card h3 svg { color: var(--accent); }
.highlight-border { border-color: var(--accent); box-shadow: 0 0 15px var(--border-glow); }

/* Footer */
.site-footer { text-align: center; padding: 40px 0 20px; font-size: 0.85rem; color: #8ea5bf; }

/* Prevent body scroll when modal is open */
html.modal-open {
    overflow: hidden;
}




.drag-handle { touch-action: none; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center; justify-content: center;
    overscroll-behavior: contain;
}
.modal-content {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
    border-radius: 16px;
    width: 90%; max-width: 420px;
    padding: 24px;
    opacity: 0; /* Start hidden */
    transform: translateY(-20px); /* Start slightly above */
    animation: modalFadeIn 0.2s forwards cubic-bezier(0.16, 1, 0.3, 1); /* 200ms animation */
    
    /* Taşmayı önlemek için maksimum yükseklik ve scroll */
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

.modal-body {
    overflow-y: auto;
    padding-right: 5px; /* Scrollbar için boşluk */
}
/* Scrollbar özelleştirmesi */
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 10px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

@keyframes modalFadeIn {
    to { transform: translateY(0); opacity: 1; }
}

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-shrink: 0; }
.modal-header h2 { font-size: 1.4rem; margin: 0; color: #fff; font-weight: 600; }
.btn-close { background: none; border: none; color: #ef4444; font-size: 1.5rem; cursor: pointer; transition: all 0.2s; padding: 0; line-height: 1; }
.btn-close:hover { color: #ff0000; transform: scale(1.1); }

.lang-list { 
    list-style: none; 
    display: grid; 
    grid-template-columns: 1fr 1fr; /* 2 sütunlu yapı */
    gap: 10px; 
    margin: 0;
    padding: 0;
}
.lang-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px; border: 1px solid var(--border);
    text-align: center; font-weight: 500; transition: 0.2s;
    font-size: 0.95rem;
}
.lang-link:hover { background: rgba(255,255,255,0.05); }
.lang-link.active { border-color: var(--accent); color: var(--accent); background: rgba(0, 255, 136, 0.05); }

@media (min-width: 768px) {
    .content-blocks { display: grid; grid-template-columns: 1fr 1fr; }
    .content-card.highlight-border { grid-column: 1 / -1; }
}

/* Form Styles for Frontend Admin */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #d1d5db; font-weight: 500; font-size: 0.95rem; }

input.form-control, textarea.form-control, select {
    background: rgba(0,0,0,0.2) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
    padding: 14px 16px !important;
    border-radius: 10px !important;
    width: 100% !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    font-family: inherit;
}
input.form-control:focus, textarea.form-control:focus, select:focus { 
    border-color: var(--accent) !important; 
    box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.1) !important;
    outline: none !important; 
    background: rgba(0,0,0,0.4) !important;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

select.form-control.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2) !important;
}

/* BYMSA Patch: Appointment form icin tema uyumlu custom dropdown. */
.app-select { position: relative; }
.app-select-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #fff;
}
.app-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.app-select-trigger:hover,
.app-select.open .app-select-trigger {
    border-color: color-mix(in srgb, var(--accent) 60%, rgba(255,255,255,0.12));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
    background: rgba(0,0,0,0.45);
}
.app-select-value {
    text-align: left;
    line-height: 1.35;
    color: #dbe8f4;
}
.app-select-caret {
    opacity: .75;
    font-size: 12px;
    transition: transform .2s ease;
}
.app-select.open .app-select-caret { transform: rotate(180deg); }
.app-select-menu {
    position: absolute;
    left: 0;
    right: 0;
    margin-top: 6px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(13,24,40,.98), rgba(8,16,30,.98));
    box-shadow: 0 16px 32px rgba(0, 0, 0, .42);
    max-height: 230px;
    overflow-y: auto;
    z-index: 1500;
    display: none;
    padding: 6px;
}
.app-select.open .app-select-menu { display: block; }
.app-select-option {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    color: #d8e4f2;
    border-radius: 8px;
    padding: 9px 10px;
    cursor: pointer;
    line-height: 1.35;
}
.app-select-option:hover {
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.app-select.is-invalid .app-select-trigger {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.footer-admin-btn,
#adminLoginBtn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--accent);
    font-size: 0.9em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.footer-admin-btn:hover,
#adminLoginBtn:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.footer-admin-btn svg,
#adminLoginBtn svg {
    color: var(--accent);
}

#appointmentButtonsList .btn {
    font-size: 1.1rem;
    padding-top: 14px;
    padding-bottom: 14px;
}

.cta-book-now-card {
    position: relative;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--accent) 55%, #ffffff 45%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 10px 28px rgba(0, 0, 0, 0.35);
    animation: book-now-card-breathe 3.8s ease-in-out infinite;
}

.cta-book-now-card::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -35%;
    width: 32%;
    height: 140%;
    background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.08) 35%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.08) 65%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-220%) skewX(-22deg);
    pointer-events: none;
    animation: book-now-sweep 4.6s ease-in-out infinite;
}

.cta-book-now-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 14px 32px color-mix(in srgb, var(--accent) 35%, rgba(0, 0, 0, 0.8));
}

.cta-book-now-title {
    letter-spacing: 0.01em;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.2);
}

#appointmentButtonsList .cta-book-now-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    animation: book-now-btn-breathe 3.2s ease-in-out infinite;
}

#appointmentButtonsList .cta-book-now-btn::before {
    content: '';
    position: absolute;
    top: -25%;
    left: -40%;
    width: 40%;
    height: 150%;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.16) 40%, rgba(255, 255, 255, 0.65) 50%, rgba(255, 255, 255, 0.16) 60%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-240%) skewX(-24deg);
    pointer-events: none;
    z-index: 0;
    animation: book-now-sweep 3.8s ease-in-out infinite;
}

#appointmentButtonsList .cta-book-now-btn > * {
    position: relative;
    z-index: 1;
}

@keyframes book-now-sweep {
    0% { transform: translateX(-240%) skewX(-24deg); opacity: 0; }
    12% { opacity: 0.15; }
    34% { opacity: 0.85; }
    58% { transform: translateX(340%) skewX(-24deg); opacity: 0; }
    100% { transform: translateX(340%) skewX(-24deg); opacity: 0; }
}

@keyframes book-now-card-breathe {
    0%, 100% {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 10px 28px rgba(0, 0, 0, 0.35);
    }
    50% {
        box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, #ffffff 55%), 0 12px 30px color-mix(in srgb, var(--accent) 30%, rgba(0, 0, 0, 0.8));
    }
}

@keyframes book-now-btn-breathe {
    0%, 100% {
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.26);
    }
    50% {
        box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 32%, rgba(0, 0, 0, 0.75));
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta-book-now-card,
    .cta-book-now-card::before,
    #appointmentButtonsList .cta-book-now-btn,
    #appointmentButtonsList .cta-book-now-btn::before {
        animation: none !important;
    }
}
