/* ========================
   MOBILE/IPHONE STYLES (max-width: 480px)
   ======================== */

:root {
    --header-font-size: 5.5vw;
    --year-font-size: 7vw;
    --month-font-size: 4vw;
    --info-font-size: 4.5vw;
    --clock-font-size: 5.5vw;
    --button-font-size: 3.8vw;
}

body {
    overflow-y: auto;
}

/* Header - optimaal voor iPhone, tekst hoger */
.header {
    height: auto;
    min-height: 7vh; /* Compacter voor meer ruimte */
    padding: 4px 10px; /* Minder padding boven */
    padding-top: 6px; /* Kleine top padding */
    border-bottom: 1px solid rgba(255, 255, 224, 0.1);
    align-items: flex-start; /* Tekst naar boven */
}

.header h1 {
    font-size: var(--header-font-size);
    line-height: 1.1;
    word-wrap: break-word;
    hyphens: auto;
    margin-top: 0;
}

.main-content {
    height: auto;
    flex-direction: column;
    padding: 5px;
}

.left-content {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
}

/* Year-month - hoger gepositioneerd */
.year-month {
    margin-right: 0;
    margin-bottom: 15px;
    margin-top: -5px;
    padding-top: 0;
}

.year {
    font-size: var(--year-font-size);
}

.month {
    font-size: var(--month-font-size);
}

.info-section {
    margin-right: 0;
    margin-bottom: 20px;
    flex-grow: 0;
}

.info-line {
    font-size: var(--info-font-size);
    line-height: 1.3;
}

.bottom-section {
    margin-right: 0;
    margin-bottom: 15px;
    margin-top: -10px;
}

.station {
    font-size: calc(var(--clock-font-size) * 0.85);
}

.clock {
    font-size: var(--clock-font-size);
}

.footer {
    font-size: calc(var(--info-font-size) * 0.85);
}

.btn {
    font-size: var(--button-font-size);
    padding: 6px 12px;
}

/* Image container - iPhone optimalisatie met hogere positionering */
.image-container {
    position: relative;
    right: 0;
    bottom: 0;
    width: calc(100vw - 10px);
    height: calc(100vw - 10px);
    max-width: none;
    max-height: 50vh;
    margin: -15px auto 10px auto;
}

.bottom-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
}

.left-column {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.control-buttons {
    gap: 5px;
    flex-wrap: wrap;
    margin-top: -5px;
}

/* Config panel - iPhone aanpassingen */
.config-panel {
    padding: 15px;
    margin: 5px;
    max-height: 85vh;
}

.config-title {
    font-size: 18px;
    margin-bottom: 15px;
}

.config-section {
    margin-bottom: 20px;
}

.config-section h3 {
    font-size: 15px;
    margin-bottom: 12px;
}

.config-label {
    font-size: 13px;
    margin-bottom: 6px;
}

.config-select, .config-input {
    font-size: 16px; /* 16px voorkomt zoom op iPhone */
    padding: 12px;
}

.config-btn {
    font-size: 13px;
    padding: 10px 16px;
}

.status-indicator {
    font-size: 11px;
    top: 5px;
    right: 5px;
    padding: 6px 10px;
}

/* Extra kleine iPhones (iPhone SE, etc.) */
@media (max-width: 375px) {
    .header {
        min-height: 6vh; /* Nog compacter */
        padding: 3px 8px;
        padding-top: 5px;
    }
    
    .year-month {
        margin-bottom: 12px;
        margin-top: -8px;
    }
    
    .info-section {
        margin-bottom: 15px;
    }
    
    .image-container {
        max-height: 45vh;
        margin: -20px auto 8px auto;
    }
    
    .left-column {
        gap: 4px;
    }
    
    .control-buttons {
        gap: 3px;
        margin-top: -8px;
    }
    
    .btn {
        padding: 4px 6px;
        font-size: 3.2vw;
    }
    
    .bottom-section {
        margin-bottom: 12px;
        margin-top: -12px;
    }
}

/* iPad specifieke aanpassingen */
@media (max-width: 768px) and (min-width: 481px) {
    .header {
        padding-top: 8px;
    }
    
    .year-month {
        margin-top: -10px;
    }
    
    .bottom-section {
        margin-top: -15px;
    }
    
    .image-container {
        margin-top: -20px;
    }
}