/* WordPress Custom Styles for SimDiscount Modern Design */
/* Targets legacy classes from archive.php, single.php, page.php and shortcodes */

/* --- Global Wrapper Fixes --- */
/* Ensure footer stays at bottom if content is short */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}
main[role="main"] {
    flex: 1;
}

/* --- Banner Section (#banner_inn_sect) --- */
/* Modernize the legacy banner */
#banner_inn_sect {
    background-color: var(--bg); /* Fallback if bg img fails */
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.banner_cont {
    /* The PHP puts a background image inline. We ensure it displays well. */
    min-height: 250px; /* Increased height to show more of the image */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background-size: cover !important; /* Ensure inline style covers */
    background-position: center !important;
}

/* Add a dark overlay so white text/span pops */
.banner_cont::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
}

.banner_cont span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Archive / Blog List (.blog_cont) --- */
#blog_section {
    padding-bottom: 4rem;
}

.blog_cont ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Reset for potential nested lists which shouldn't be grids */
.blog_cont ul ul {
    display: block;
}

.blog_cont li.eq {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Equal height cards */
}

.blog_cont li.eq:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

/* Image container */
.blog_cont li.eq > a:first-child {
    display: block;
    height: 200px; /* Fixed height for images */
    overflow: hidden;
}

.blog_cont li.eq img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.blog_cont li.eq:hover img {
    transform: scale(1.05);
}

.blog_cont li.eq h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text, #333);
    margin: 0;
    display: block;
}

.blog_cont li.eq h3 a {
    color: inherit; /* Inherit color from h3 */
    text-decoration: none; /* Remove default underline */
    transition: color 0.2s;
}

.blog_cont li.eq h3 a:hover {
    color: var(--primary); /* Primary color on hover */
    text-decoration: underline;
}

.blog_cont li.eq p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1; /* Push button to bottom */
    margin: 0;
}

/* "Mehr erfahren" Link */
.blog_cont li.eq > a:last-child {
    display: block;
    margin: 0 1.5rem 1.5rem;
    padding: 0.8rem 1.5rem;
    background-color: #fff4e5; /* Light orange background */
    color: var(--primary);
    text-align: center;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}

.blog_cont li.eq > a:last-child:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* --- Main Content Area (.trip_cont) --- */

.trip_cont {
    background: var(--white);
    padding: 4rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    max-width: 1000px; /* Increased optimal reading width to 1000px */
    margin: 0 auto; /* Center it */
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    /* No flexbox here for main content */
}
/* Clearfix for floated widgets */
.trip_cont::after {
    content: "";
    display: table;
    clear: both;
}

/* Hide interfering elements like <br> or empty <p> */
.trip_cont > br,
.trip_cont > p:empty {
    display: none;
}

.trip_cont h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1.5rem;
    width: 100%; /* Ensure header takes full width */
    display: block; /* Ensure it's a block element */
    clear: both; /* Clear any floats before it */
}

.trip_cont h2,
.trip_cont h3,
.trip_cont h4,
.trip_cont h5,
.trip_cont h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    font-weight: 700;
    margin-top: 2.5rem; /* Standard top margin for headings */
    margin-bottom: 1rem; /* Standard bottom margin for headings */
    line-height: 1.2;
    display: block; /* Ensure they are block elements */
    clear: both; /* Clear any floats before them */
    width: 100%; /* Ensure they take full width */
}
.trip_cont h2 { font-size: 1.8rem; }
.trip_cont h3 { font-size: 1.4rem; }
.trip_cont h4 { font-size: 1.2rem; } /* Added for completeness */
.trip_cont h5 { font-size: 1.1rem; } /* Added for completeness */
.trip_cont h6 { font-size: 1rem; }    /* Added for completeness */

.trip_cont p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary, #555);
    font-size: 1.05rem;
    display: block; /* Ensure it's a block element */
    /* clear: both; REMOVED to allow wrapping around floats */
    /* width: 100%; REMOVED to allow standard block flow */
}

.trip_cont ul, .trip_cont ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem; /* Ensure indentation on desktop */
    display: block; /* Ensure they are block elements */
    clear: both; /* Clear any floats before them */
    width: 100%; /* Ensure they take full width */
}

.trip_cont li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text-secondary, #555);
    list-style: disc; /* Explicitly set list style */
}
.trip_cont ol li { /* Ensure ordered list items have decimal style */
    list-style: decimal;
}

.trip_cont img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem; /* Only vertical margin by default */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    /* Removed display: block; clear: both; to allow floating */
}

/* Blockquotes */
.trip_cont blockquote {
    border-left: 4px solid var(--primary);
    margin: 2rem 0;
    padding: 1rem 2rem;
    background: #fff9f0;
    font-style: italic;
    color: var(--text);
    border-radius: 0 8px 8px 0;
    display: block; /* Ensure it's a block element */
    clear: both; /* Clear any floats before it */
    width: 100%; /* Ensure it takes full width */
}

.trip_cont .alignleft {
    float: left;
    margin-right: 2rem;
    margin-bottom: 1rem;
}
.trip_cont .alignright {
    float: right;
    margin-left: 2rem;
    margin-bottom: 1rem;
}
.trip_cont .aligncenter {
    display: block;
    margin: 2rem auto;
}

.trip_cont a {
    color: var(--primary);
    text-decoration: underline; /* Default for all links */
    text-underline-offset: 2px;
}

.trip_cont a:hover {
    text-decoration: none;
    color: var(--primary-dark);
}

/* Specific: Remove underline from links *inside* headings by default */
.trip_cont h1 a,
.trip_cont h2 a,
.trip_cont h3 a,
.trip_cont h4 a,
.trip_cont h5 a,
.trip_cont h6 a {
    text-decoration: none; /* No underline by default in headings */
    color: inherit; /* Inherit color from the heading */
}

.trip_cont h1 a[href]:hover,
.trip_cont h2 a[href]:hover,
.trip_cont h3 a[href]:hover,
.trip_cont h4 a[href]:hover,
.trip_cont h5 a[href]:hover,
.trip_cont h6 a[href]:hover {
    text-decoration: underline; /* Underline on hover for links in headings */
    color: var(--primary); /* Primary color on hover */
}

/* Ensure non-navigational anchors within headings do not have hover effects */
.trip_cont h1 a:not([href]):hover,
.trip_cont h2 a:not([href]):hover,
.trip_cont h3 a:not([href]):hover,
.trip_cont h4 a:not([href]):hover,
.trip_cont h5 a:not([href]):hover,
.trip_cont h6 a:not([href]):hover {
    text-decoration: none; /* No underline on hover */
    color: inherit; /* No color change on hover, inherit from parent */
    cursor: default; /* Change cursor to default for non-links */
}


/* --- Shortcode Widgets (.blog_cont_text.eq) --- */
/* Similar to blog cards but specific for the tariff widgets */

div.blog_cont_text.eq {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    width: 100%; /* Take available width up to max-width */
    max-width: 230px; /* Reduced width to 230px */
    float: left; /* Use float for side-by-side */
    margin-right: 1.5rem; /* Manual gap */
    margin-bottom: 1.5rem; /* Keep vertical margin for wrapping */
    display: flex; /* Keep flex for internal layout */
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: auto !important; /* Override inline style for responsiveness */
}

.blog_cont_text_top {
    padding: 0.5rem 0.6rem; /* Back to aggressive compact padding */
}

.blog_cont_text_bottom {
    background-color: #f9f9f9;
    padding: 0.15rem 0.5rem; /* Back to aggressive compact padding */
    border-top: 1px solid var(--border);
    text-align: right;
}
.blog_cont_text_bottom a {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s, text-decoration 0.2s;
    line-height: 1; /* Tighten line height for link */
}

.blog_cont_text_bottom a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.blog_cont_text_bottom img {
    margin-left: 0.15rem; /* Minimal margin */
    height: 8px; /* Even smaller arrow */
    vertical-align: middle; /* Ensure arrow aligns with text */
}

.blog_text_top {
    display: flex;
    justify-content: space-between; /* Space out children */
    align-items: flex-start; /* Align items to the top */
    margin-top: 0.4rem; /* Reduced top margin */
    flex-wrap: nowrap; /* CRUCIAL: Prevent wrapping to force side-by-side */
    gap: 0.5rem; /* Small gap between text and image */
}

.blog_text_top_left {
    flex-grow: 1; /* Allow left side to take up available space */
    min-width: 0; /* Allow shrinking if content is too long */
}

.blog_text_top_left ul {
    padding: 0;
    margin: 0;
    list-style: none !important;
}

.blog_text_top_left li {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    padding-left: 0.8rem; /* Adjusted padding for checkmark */
    position: relative;
    line-height: 1.2; /* Tighter line height */
}

.blog_text_top_left small {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 0.2rem;
}

.blog_text_top_right {
    flex-shrink: 0; /* Prevent image from shrinking */
    margin-top: 0; /* Remove top margin */
}

.blog_text_top_right img {
    max-width: 45px; /* Even smaller image for more room */
    height: auto;
}

@media (max-width: 768px) {
    .banner_cont { min-height: 180px; } /* Increased height for mobile banner */
    .banner_cont span { font-size: 1.2rem; padding: 0.5rem 1.5rem; }
    
    .trip_cont {
        padding: 0.8rem; /* Adjusted padding for mobile content area */
    }
    .trip_cont h1 { font-size: 1.8rem; }
    .trip_cont h2 {
        font-size: 1.3rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    .trip_cont p { /* Ensure minimal paragraph spacing on mobile */
        margin-bottom: 0.6rem;
        margin-top: 0;
    }
    .trip_cont ul, .trip_cont ol { /* Ensure lists are indented and styled on mobile */
        padding-left: 1.2rem; /* Adequate padding for mobile list indentation */
        margin-bottom: 0.8rem; /* Adjusted margin on mobile */
    }
    .trip_cont ul { list-style: disc !important; }
    .trip_cont ol { list-style: decimal !important; }
    .trip_cont li {
        margin-bottom: 0.3rem; /* Adjusted list item margin on mobile */
        line-height: 1.5; /* Adjusted line height for readability on mobile */
    }
    
    .blog_cont ul {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
    
    .trip_cont .alignleft, .trip_cont .alignright {
        float: none;
        display: block;
        margin: 1rem auto;
    }
    
    /* Stack internal elements of widget on very small screens */
    .blog_text_top {
        flex-direction: row; /* Force side-by-side on mobile */
        align-items: flex-start;
        margin-top: 0.3rem;
        flex-wrap: nowrap; /* Prevent wrapping on mobile */
    }
    .blog_text_top_right {
        align-self: flex-start; /* Align to top */
        margin-top: 0; /* Remove margin */
        margin-left: 0.3rem; /* Add small left margin */
    }
    .blog_cont_text_bottom {
        padding: 0.1rem 0.4rem;
    }
    .blog_cont_text_top h3, .blog_cont_text_top strong {
        font-size: 0.85rem;
    }
    .blog_text_top_left li {
        font-size: 0.7rem;
        padding-left: 0.7rem;
    }
    .blog_text_top_left small {
        font-size: 0.75rem;
    }
    .blog_text_top_right img {
        max-width: 35px; /* Smaller image on mobile to fit */
    }
    .blog_cont_text_bottom img {
        height: 7px;
    }
}