/*
 * File: /assets/css/base/global.css
 * Description: Foundational stylesheet for Priceyoo theme.
 * VERSION 3.4: Increased Container Width & Content Font Size for better readability.
 */

/* ==========================================================================
   1. CSS Variables (Root Configuration)
   ========================================================================== */
:root {
    /* Colors */
    --py-primary-color: #C8102E;
    --py-primary-dark: #a20d24;
    --py-primary-rgb: 200, 16, 46;
    
    --py-secondary-color: #1a202c;
    --py-accent-color: #f5af19;
    
    --py-text-color: #2d3748;
    --py-text-light: #4A5568;
    
    --py-border-color: #e2e8f0;
    
    --py-bg-color: #ffffff;
    --py-card-bg: #ffffff;
    --py-footer-text-color: #a0aec0;

    /* Typography */
    --py-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --py-font-secondary: 'Poppins', sans-serif;
    
    /* Spacing & Layout */
    --py-container-width: 1280px; /* INCREASED from 1200px */
    --py-border-radius: 8px;
}

/* ==========================================================================
   2. Base Resets & Body Defaults
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--py-font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--py-text-color);
    background-color: var(--py-bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ==========================================================================
   3. Global Layout
   ========================================================================== */
#page { 
    overflow-x: clip; 
    overflow-y: visible; 
    position: relative;
}

.site-content {
    overflow: visible !important; 
}

.container {
    max-width: var(--py-container-width);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.container-fluid { width: 100%; padding-left: 20px; padding-right: 20px; }

/* ==========================================================================
   4. Typography & Content Size
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.75em;
    font-family: var(--py-font-secondary);
    font-weight: 700;
    line-height: 1.3;
    color: var(--py-secondary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p { margin-top: 0; margin-bottom: 1.25em; }

a { color: var(--py-primary-color); text-decoration: none; transition: color 0.2s ease-in-out; }
a:hover { color: var(--py-primary-dark); }

.archive-title { font-size: 1.8rem; margin-top: 15px; }

/* INCREASED CONTENT FONT SIZE */
.entry-content, 
.sp-dynamic-content-area,
.page-content-wrapper {
    font-size: 1.15rem; /* Increased for better readability */
    line-height: 1.8;
}

/* ==========================================================================
   5. Default Element Styling (Buttons, Forms, Tables)
   ========================================================================== */

.button, button, input[type="button"], input[type="reset"], input[type="submit"] {
    display: inline-block; padding: 10px 20px; font-size: 1rem; font-weight: 600;
    font-family: var(--py-font-primary); text-align: center; text-decoration: none;
    cursor: pointer; border: 1px solid transparent; border-radius: var(--py-border-radius);
    transition: all 0.2s ease-in-out; line-height: 1.5;
}
.button-primary, button.button-primary, input[type="submit"] { background-color: var(--py-primary-color); color: #fff; }
.button-primary:hover, button.button-primary:hover, input[type="submit"]:hover { background-color: var(--py-primary-dark); color: #fff; }

input[type="text"], input[type="email"], input[type="search"], input[type="password"], textarea {
    width: 100%; padding: 10px 15px; border: 1px solid var(--py-border-color);
    border-radius: var(--py-border-radius); font-family: var(--py-font-primary);
    font-size: 1rem; background-color: #fff;
}
input:focus, textarea:focus {
    outline: none; border-color: var(--py-primary-color);
    box-shadow: 0 0 0 2px rgba(var(--py-primary-rgb), 0.2);
}

ul, ol { margin: 0 0 1.5em 1.5em; padding: 0; }

table { 
    width: 100% !important; 
    max-width: 100%; 
    border-collapse: collapse; 
    margin-bottom: 1.5em; 
    border: 1px solid var(--py-border-color); 
    background-color: #fff; 
    font-size: 1rem; /* Increased table font size */
    table-layout: auto; 
    word-break: normal;
    overflow-wrap: break-word;
}
th, td { 
    padding: 14px 16px; /* Increased padding */
    border: 1px solid var(--py-border-color); 
    text-align: left; 
    vertical-align: middle; 
    color: var(--py-text-color); 
}
th { 
    background-color: #f8f9fa; 
    font-weight: 600; 
    color: var(--py-secondary-color); 
    text-transform: uppercase; 
    font-size: 0.9rem; 
    letter-spacing: 0.5px; 
}
tbody tr:nth-child(even) { background-color: #fcfcfc; }
tbody tr:hover { background-color: #f1f3f5; }

.entry-content table, 
.sp-dynamic-content-area table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   6. WordPress Core Styles
   ========================================================================== */
.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0;
    position: absolute !important; width: 1px; word-wrap: normal !important;
}

/* ==========================================================================
   7. GUTENBERG BLOCK STYLES
   ========================================================================== */
.wp-block-heading,
.wp-block-paragraph,
.wp-block-list,
.wp-block-quote,
.wp-block-image,
.wp-block-separator {
    margin-bottom: 1.5em;
}

.wp-block-heading { margin-top: 1.5em; margin-bottom: 0.75em; }
.wp-block-list { padding-left: 1.5em; }
.wp-block-list li { margin-bottom: 0.5em; }

.wp-block-quote {
    border-left: 4px solid var(--py-primary-color);
    padding: 20px 25px;
    background-color: #f8f9fa;
    font-size: 1.2rem;
    font-style: italic;
    margin-left: 0;
    margin-right: 0;
}
.wp-block-quote p { margin-bottom: 0.5em; }
.wp-block-quote cite { display: block; margin-top: 1em; font-size: 0.95rem; font-style: normal; color: var(--py-text-light); }
.wp-block-quote cite::before { content: "— "; }

.wp-block-image img { max-width: 100%; height: auto; border-radius: var(--py-border-radius); }
.wp-block-image figcaption { font-size: 0.95rem; color: var(--py-text-light); text-align: center; margin-top: 0.5em; }
.wp-block-image.aligncenter { text-align: center; margin-left: auto; margin-right: auto; }
.wp-block-image.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.wp-block-image.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }

hr, .wp-block-separator { border: none; border-top: 1px solid var(--py-border-color); margin: 2em auto; max-width: 100px; }
.wp-block-separator.is-style-wide { max-width: 100%; }
.wp-block-separator.is-style-dots::before { content: "···"; font-size: 1.5rem; color: var(--py-border-color); letter-spacing: 0.5em; }
.wp-block-separator.is-style-dots { border: none; background: none; text-align: center; }

/* ==========================================================================
   8. Pagination
   ========================================================================== */
.py-pagination { margin-top: 50px; margin-bottom: 40px; width: 100%; text-align: center; display: block; }
.py-pagination ul.page-numbers { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; padding: 0; margin: 0; list-style: none; border: none; }
.py-pagination ul.page-numbers li { margin: 0; padding: 0; border: none; background: none; display: block; }
.py-pagination ul.page-numbers .page-numbers { display: flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; background-color: #fff; border: 1px solid var(--py-border-color); color: var(--py-text-light); border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 0.95rem; line-height: 1; transition: all 0.2s ease-in-out; }
.py-pagination ul.page-numbers a.page-numbers:hover { background-color: #fff; color: var(--py-primary-color); border-color: var(--py-primary-color); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.py-pagination ul.page-numbers span.page-numbers.current { background-color: var(--py-primary-color); color: #fff; border-color: var(--py-primary-color); cursor: default; transform: none; box-shadow: none; }
.py-pagination .page-numbers i { font-size: 0.85rem; }

/* ==========================================================================
   9. Mobile Responsiveness (Global)
   ========================================================================== */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.2rem; }
    h5 { font-size: 1.1rem; }
    .container, .container-fluid { padding-left: 15px; padding-right: 15px; }
    .archive-title { font-size: 1.0rem; margin-top: 15px; }
    .entry-content, .sp-dynamic-content-area, .page-content-wrapper { font-size: 1.05rem; }
}

/* ==========================================================================
   10. Breadcrumbs
   ========================================================================== */
.breadcrumbs { list-style: none; margin: 0 0 20px 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; font-size: 0.9rem; color: var(--py-text-light); }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs a { color: var(--py-text-light); text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--py-primary-color); }
.breadcrumbs .separator { margin: 0 8px; font-size: 0.7rem; color: #cbd5e0; }
.breadcrumbs .bread-current { color: var(--py-text-color); font-weight: 600; }
@media (max-width: 768px) { .breadcrumbs { font-size: 0.8rem; margin-bottom: 15px; } }

/* ==========================================================================
   11. Theme Specifics
   ========================================================================== */
.plan-card-wrapper .operator-logo { object-fit: contain; }

.py-read-more-wrap { position: relative; margin-bottom: 25px; }
.py-read-more-content { overflow: hidden; transition: max-height 0.4s ease-out; position: relative; }
.py-read-more-content.collapsed { max-height: 120px; }
.py-read-more-content.collapsed::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 50px; background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1)); pointer-events: none; }
.py-read-more-btn { background: none; border: none; color: var(--py-primary-color); padding: 8px 0; font-weight: 600; cursor: pointer; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 5px; transition: color 0.2s; }
.py-read-more-btn:hover { color: var(--py-primary-dark); text-decoration: underline; }
.py-read-more-btn i { font-size: 0.8em; transition: transform 0.3s ease; }
.py-read-more-btn.active i { transform: rotate(180deg); }

.py-faq-section { margin-top: 40px; margin-bottom: 40px; background: var(--py-card-bg); padding: 30px; border-radius: var(--py-border-radius); box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid var(--py-border-color); }
.py-faq-title { text-align: center; margin-bottom: 30px; font-size: 1.8rem; color: var(--py-secondary-color); }
.py-faq-list { display: flex; flex-direction: column; }
.py-faq-item { border-bottom: 1px solid var(--py-border-color); }
.py-faq-item:last-child { border-bottom: none; }
.py-faq-question { width: 100%; text-align: left; padding: 18px 0; background: none; border: none; font-weight: 600; font-size: 1.05rem; color: var(--py-secondary-color); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: color 0.2s; }
.py-faq-question:hover { color: var(--py-primary-color); }
.py-faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; color: var(--py-text-light); line-height: 1.7; }
.py-faq-answer-inner { padding-bottom: 20px; }
.py-faq-icon { transition: transform 0.3s ease; color: #cbd5e0; }
.py-faq-item.active .py-faq-question { color: var(--py-primary-color); }
.py-faq-item.active .py-faq-icon { transform: rotate(180deg); color: var(--py-primary-color); }