/* Gut Health Quiz Styles - Responsive & Modern with DM Sans - v4 Overflow Fix */

/* Google Font Import (DM Sans - Regular 400, Medium 500, Bold 700) */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400;1,9..40,500;1,9..40,700&display=swap');

/* Genel Stil ve Fontlar */
#ghq-quiz-container {
    max-width: 750px;
    margin: 30px auto;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
    box-sizing: border-box;
}

/* Başlıklar */
#ghq-quiz-container h2,
#ghq-quiz-container h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 700;
}
#ghq-start-title,
#ghq-result-title { font-size: 1.8em; }
#ghq-question-title      { font-size: 1.5em; }

/* Görseller (Responsive) */
#ghq-start-image,
#ghq-question-image,
#ghq-result-image {
    max-width: 90%;
    height: auto;
    margin: 20px auto;
    display: block;
    border-radius: 8px;
}

/* Açıklamalar/Paragraflar */
#ghq-question-description,
#ghq-result-description {
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 1.1em;
    font-weight: 400;
}

/* Genel Buton Stili */
.ghq-button {
    display: inline-block;
    background-color: #3498db;
    color: #ffffff;
    padding: 14px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.ghq-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}
.ghq-button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Cevaplar Alanı (Responsive Grid) */
#ghq-answers {
    margin-top: 25px;
    display: grid;
    grid-template-columns: 1fr; /* Mobil: 1 kolon */
    gap: 15px;
}
@media (min-width: 500px) {
    #ghq-answers {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}
/* İsteğe bağlı: masaüstünde sabit 2 kolon isterseniz
@media (min-width: 800px) {
    #ghq-answers {
        grid-template-columns: repeat(2, 1fr);
    }
}
*/

/* --- CEVAP BUTONU (TAŞMA DÜZELTME) --- */
.ghq-answer-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    color: #34495e;
    padding: 18px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    line-height: 1.4;

    /* Taşmayı engelleyen yeni eklemeler */
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}
.ghq-answer-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
}
.ghq-answer-button img {
    max-width: 60px;
    max-height: 60px;
    height: auto;
    display: block;
    margin-bottom: 10px;
    border-radius: 5px;
    flex-shrink: 0;
}
/* --- CEVAP BUTONU SONU --- */

/* Lead Form */
#ghq-lead-form { margin-top: 30px; text-align: left; }
#ghq-lead-form h3 { text-align: center; margin-bottom: 25px; }
#ghq-lead-form div:not(#ghq-loading) { margin-bottom: 18px; }
#ghq-lead-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 0.95em;
}
#ghq-lead-form input[type="text"],
#ghq-lead-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    font-family: "DM Sans", sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#ghq-lead-form input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}
#ghq-lead-form button[type="submit"] {
    display: block;
    width: auto;
    margin: 25px auto 0;
}

/* Loading Indicator */
#ghq-loading {
    text-align: center;
    margin-top: 20px;
    color: #6c757d;
    font-style: italic;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-weight: 400;
}

/* Error Messages */
.ghq-error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.95em;
    font-weight: 400;
}

/* Progress Bar */
.ghq-progress-bar {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 25px;
    margin-bottom: 25px;
    height: 28px;
    position: relative;
    overflow: hidden;
}
.ghq-progress {
    width: 0;
    height: 100%;
    background-color: #28a745;
    border-radius: 25px;
    transition: width 0.4s ease-in-out;
    position: absolute;
    left: 0;
    top: 0;
}
.ghq-progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 28px;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    z-index: 1;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}

/* --- MOBİL CİHAZLAR İÇİN MEDIA QUERY'LER --- */
@media (max-width: 600px) {
    #ghq-quiz-container {
        width: 95%;
        padding: 20px;
        margin: 15px auto;
    }
    #ghq-start-title,
    #ghq-result-title { font-size: 1.6em; }
    #ghq-question-title      { font-size: 1.3em; }
    #ghq-question-description,
    #ghq-result-description  { font-size: 1em; margin-bottom: 20px; }
    .ghq-button              { padding: 12px 25px; font-size: 1em; }
    .ghq-answer-button {
        padding: 15px 10px;
        font-size: 0.9em;
        min-height: 45px;
    }
    .ghq-answer-button img   { max-width: 50px; max-height: 50px; }
    #ghq-lead-form input      { padding: 10px 12px; font-size: 0.95em; }
    #ghq-progress-bar         { height: 24px; margin-bottom: 20px; }
    .ghq-progress-text        { line-height: 24px; font-size: 12px; }
}

@media (max-width: 400px) {
    #ghq-quiz-container {
        padding: 15px;
    }
    #ghq-start-title,
    #ghq-result-title { font-size: 1.4em; }
    #ghq-question-title { font-size: 1.2em; }
    .ghq-button          { padding: 10px 20px; font-size: 0.95em; }
    .ghq-answer-button   { padding: 12px 8px; font-size: 0.85em; }
}
