/*
Theme Name: Better Call Jamie
Theme URI: https://bettercalljamie.nl/
Author: Jamie
Author URI: https://bettercalljamie.nl/
Description: Custom WordPress theme for Better Call Jamie
Version: 1.1
License: GPL v2 or later
Text Domain: bettercalljamie
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    background-color: #485147;
    background-image: url('wp-bg.jpg');
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: fixed;
    background-size: 1179px auto;
    margin: 0;
    padding: 0;
    color: #dad8b5;
    font-family: sans-serif;
    overflow-x: hidden;
}

/* Hide page titles by default */
.hide-title .entry-title,
.page-title-hidden .entry-title {
    display: none;
}

/* MAIN CONTAINER - centered, 1179px wide */
#main-container {
    position: relative;
    width: 1179px;
    margin: 0 auto;
    min-height: 100vh;
}

/* HEADER */
#header {
    position: absolute;
    top: 72px;
    left: 100px;
    width: 979px;
    height: 74px;
    background-image: url('wp-header.png');
    background-repeat: no-repeat;
    background-size: 979px 74px;
}

/* HEADER LEFT (Logo) */
#header-left {
    position: absolute;
    left: 0;
    top: 0;
    width: 152px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#header-left img {
    width: 124px;
    height: 48px;
    display: block;
}

/* HEADER RIGHT (Menu area) */
#header-right {
    position: absolute;
    left: 152px;
    top: 0;
    width: 827px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* MENU */
#main-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

#main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

#main-navigation li {
    margin: 0 15px;
}

#main-navigation a {
    font-family: var(--menu-font-family, sans-serif);
    color: #1b1510;
    text-decoration: none;
    font-size: var(--menu-font-size, 16px);
    padding: 5px 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: block;
}

#main-navigation a:hover {
    transform: scale(1.05);
}

/* CONTENT AREA */
#content-area {
    position: absolute;
    top: 201px; /* 72px (header top) + 74px (header height) + 55px (spacing) */
    left: 100px;
    width: 979px;
    min-height: 500px;
    padding: 30px 0;
}

/* WordPress Content */
.entry-header {
    margin-bottom: 30px;
}

.entry-title {
    color: var(--title-color, #ffae00);
    font-family: var(--title-font-family, monospace);
    font-size: var(--title-font-size, 28px);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.entry-content {
    color: var(--text-color, #dad8b5);
    line-height: 1.6;
    font-size: var(--text-font-size, 16px);
    font-family: var(--text-font-family, sans-serif);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: var(--heading-color, #cef062);
    margin: 25px 0 15px;
    font-family: var(--heading-font-family, monospace);
    text-transform: uppercase;
}

.entry-content h1 { font-size: var(--h1-font-size, 26px); }
.entry-content h2 { font-size: var(--h2-font-size, 24px); }
.entry-content h3 { font-size: var(--h3-font-size, 22px); }
.entry-content h4 { font-size: var(--h4-font-size, 20px); }
.entry-content h5 { font-size: var(--h5-font-size, 18px); }
.entry-content h6 { font-size: var(--h6-font-size, 16px); }

.entry-content p {
    margin-bottom: 15px;
}

.entry-content a {
    color: var(--link-color, #5ceeff);
    text-decoration: none;
}

.entry-content a:hover {
    color: var(--link-hover-color, #7cf0ff);
    text-decoration: underline;
}

.entry-content ul,
.entry-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.entry-content li {
    margin-bottom: 5px;
}

/* WordPress specific */
.wp-block-image,
.wp-block-gallery {
    margin: 20px 0;
}

.wp-block-image img,
.wp-block-gallery img {
    max-width: 100%;
    height: auto;
}

.aligncenter {
    display: block;
    margin: 20px auto;
}

.alignleft {
    float: left;
    margin: 0 20px 20px 0;
    max-width: 50%;
}

.alignright {
    float: right;
    margin: 0 0 20px 20px;
    max-width: 50%;
}

.wp-caption {
    margin-bottom: 20px;
}

.wp-caption-text {
    color: #cef062;
    font-style: italic;
    margin-top: 5px;
    font-size: 14px;
    text-align: center;
}

/* Comments */
.comments-area {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ffae00;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-body {
    margin-bottom: 20px;
    padding: 15px;
}

.comment-meta {
    color: #cef062;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Search Form */
.search-form {
    display: flex;
    margin-bottom: 20px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ffae00;
    background: rgba(0,0,0,0.3);
    color: #dad8b5;
}

.search-form button {
    padding: 10px 20px;
    background: #ffae00;
    border: none;
    color: #1b1510;
    cursor: pointer;
}

/* Widgets */
.widget {
    margin-bottom: 30px;
}

.widget-title {
    color: #ffae00;
    font-size: 20px;
    margin-bottom: 15px;
    font-family: monospace;
    text-transform: uppercase;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 174, 0, 0.3);
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #5ceeff;
    text-decoration: none;
}

.widget a:hover {
    color: #7cf0ff;
}

/* ===========================================
   RESPONSIVE DESIGN FOR MOBILE PORTRAIT
   =========================================== */

/* Tablet Landscape and Smaller Desktops */
@media (max-width: 1179px) {
    #main-container {
        width: 100%;
    }
    
    #header {
        width: 83%; /* 979/1179 = 83% */
        left: 8.5%; /* (100%/2 - 83%/2) */
        background-size: 100% 74px;
    }
    
    #content-area {
        width: 83%;
        left: 8.5%;
    }
    
    body {
        background-size: 100% auto;
    }
}

/* Tablet Portrait */
@media (max-width: 900px) {
    #main-container {
        width: 100%;
        overflow-x: hidden;
    }
    
    #header {
        width: 90%;
        left: 5%;
        background-size: 100% auto;
        height: 60px;
    }
    
    #header-left {
        width: 120px;
        height: 60px;
    }
    
    #header-left img {
        width: 100px;
        height: 38px;
    }
    
    #header-right {
        left: 120px;
        width: calc(100% - 120px);
        height: 60px;
    }
    
    #content-area {
        width: 90%;
        left: 5%;
        padding: 15px 0;
    }
    
    #main-navigation ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 10px;
        white-space: nowrap;
    }
    
    #main-navigation li {
        margin: 0 10px;
        flex-shrink: 0;
    }
    
    #main-navigation a {
        font-size: 14px;
        padding: 3px 6px;
    }
}

/* Mobile Landscape */
@media (max-width: 767px) and (orientation: landscape) {
    #header {
        height: 50px;
        background-size: 100% 50px;
    }
    
    #header-left {
        width: 100px;
        height: 50px;
    }
    
    #header-left img {
        width: 80px;
        height: 30px;
    }
    
    #header-right {
        left: 100px;
        width: calc(100% - 100px);
        height: 50px;
    }
    
    #main-navigation a {
        font-size: 13px;
        padding: 2px 4px;
    }
    
    #content-area {
        top: 135px; /* Adjusted for smaller header */
    }
}

/* Mobile Portrait - Most Important! */
@media (max-width: 480px) and (orientation: portrait) {
    /* Make everything fit in portrait mode */
    #main-container {
        width: 100vw;
        min-width: 320px;
        overflow-x: hidden;
    }
    
    /* Header adjustments for portrait */
    #header {
        position: relative;
        top: 20px;
        left: 0;
        width: 95%;
        margin: 0 auto;
        height: auto;
        min-height: 60px;
        background: none;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Stack header sections vertically */
    #header-left {
        position: relative;
        left: 0;
        width: 100%;
        height: 60px;
        margin-bottom: 10px;
        justify-content: center;
    }
    
    #header-left img {
        width: 100px;
        height: 38px;
    }
    
    #header-right {
        position: relative;
        left: 0;
        width: 100%;
        height: auto;
        min-height: 40px;
    }
    
    /* Stack menu vertically */
    #main-navigation ul {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow: visible;
        white-space: normal;
        width: 100%;
    }
    
    #main-navigation li {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
    
    #main-navigation a {
        font-size: 16px;
        padding: 8px;
        display: block;
        width: 100%;
    }
    
    /* Content area adjustments */
    #content-area {
        position: relative;
        top: 30px;
        left: 0;
        width: 95%;
        margin: 0 auto;
        padding: 15px 0;
    }
    
    /* Adjust font sizes for mobile */
    .entry-content {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .entry-title {
        font-size: 22px;
    }
    
    .entry-content h1 { font-size: 20px; }
    .entry-content h2 { font-size: 18px; }
    .entry-content h3 { font-size: 17px; }
    .entry-content h4 { font-size: 16px; }
    
    /* Make images responsive */
    .wp-block-image img,
    .wp-block-gallery img,
    .alignleft,
    .alignright {
        max-width: 100% !important;
        float: none !important;
        margin: 10px auto !important;
        display: block;
    }
    
    /* Adjust padding */
    .entry-content p,
    .entry-content ul,
    .entry-content ol {
        padding: 0 10px;
    }
    
    /* Remove fixed background on very small screens */
    body {
        background-attachment: scroll;
        background-size: cover;
    }
}

/* Very small phones */
@media (max-width: 360px) and (orientation: portrait) {
    #header-left img {
        width: 90px;
        height: 35px;
    }
    
    #main-navigation a {
        font-size: 15px;
        padding: 6px;
    }
    
    .entry-content {
        font-size: 14px;
    }
    
    .entry-title {
        font-size: 20px;
    }
}

/* High-resolution phones */
@media (max-width: 480px) and (min-resolution: 2dppx) {
    /* Sharper images on retina */
    #header-left img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}