/* Base styles with compatibility for older browsers */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif; /* Widely supported font stack */
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    padding: 0;
    margin: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
.header {
    text-align: center;
    padding: 20px 0;
    background-color: #003366;
    color: white;
    border-bottom: 1px solid #002244;
}

.header h1 {
    margin-bottom: 10px;
    font-size: 28px;
}

/* Content area */
.content {
    flex: 1;
    padding: 30px 0;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* Page styles */
.page {
    display: none;
    padding: 20px;
}

.page.active {
    display: block;
}

/* Question styles */
.question-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.question-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #003366;
}

.question-description {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Choice container styles */
.choice-container {
    background-color: #003366;
    border-radius: 8px;
    padding: 20px;
    margin: 30px auto;
    max-width: 500px;
    color: white;
}

.choice-text-top {
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.choice-text-bottom {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.8;
}

/* Select container styles */
.select-container {
    background-color: #003366;
    border-radius: 8px;
    padding: 20px;
    margin: 30px auto;
    max-width: 500px;
    color: white;
}

.select-text-top {
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.select-text-bottom {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.8;
}

.dropdown-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.custom-select {
    width: 100%;
    max-width: 350px;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #fff;
    border-radius: 4px;
    background-color: white;
    color: #333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 14px;
}

.custom-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.25);
}

/* Button styles */
.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: white;
    color: #003366;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    width: 120px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-yes {
    background-color: #4CAF50;
    color: white;
}

.btn-yes:hover {
    background-color: #45a049;
}

.btn-no {
    background-color: #f44336;
    color: white;
}

.btn-no:hover {
    background-color: #d32f2f;
}

/* Image container styles */
.image-container {
    margin: 30px auto;
    max-width: 600px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.image-link {
    display: block;
    position: relative;
    text-decoration: none;
    color: white;
    transition: transform 0.3s ease;
}

.image-link:hover {
    transform: scale(1.02);
}

.clickable-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Specific size for roundup.jpg image and caption in page3 */
#page3 .image-container {
    max-width: 350px;
    margin: 30px auto;
}

#page3 .clickable-image {
    width: 100%; /* Fill the container which is now 25% of original size */
    height: auto;
}

#page3 .image-caption {
    /* No need to override width as it will match the container */
    padding: 10px; /* Slightly smaller padding for the smaller caption */
    font-size: 14px; /* Slightly smaller font for the smaller caption */
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 51, 102, 0.8);
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

/* Footer styles */
.footer {
    text-align: center;
    padding: 20px 0;
    background-color: #f1f1f1;
    border-top: 1px solid #ddd;
    font-size: 14px;
    color: #666;
}

.footer p {
    margin-bottom: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header h1 {
        font-size: 24px;
    }
    
    .question-title {
        font-size: 20px;
    }
    
    .button-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
        padding: 12px 20px;
    }
    
    .choice-container {
        padding: 15px;
    }
    
    .choice-text-top {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 20px;
    }
    
    .content {
        padding: 15px 0;
    }
    
    .page {
        padding: 10px;
    }
    
    .question-title {
        font-size: 18px;
    }
}

/* Loading indicator */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading:after {
    content: "...";
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60%, 100% {
        content: "...";
    }
}
