/* ============================================
   Inone Theme - Main Stylesheet
   Mobile-first, responsive design
   ============================================ */

/* ============================================
   1. RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: #0066CC;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #DC143C;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input[type="submit"], input[type="button"] {
    font-family: inherit;
    cursor: pointer;
}

/* ============================================
   2. CONTAINER & GRID
   ============================================ */

.container {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 750px;
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 980px;
        padding: 0 2rem;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
        padding: 0 2rem;
    }
}

/* Grid layout */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Single post layout width tuning */
.single-layout {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .single-layout {
        grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    }
}

@media (min-width: 768px) {
    .grid.single-layout {
        grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) !important;
    }
}

.grid-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-4 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Single layout helpers */
.content-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    grid-column: 1;
}

/* ============================================
   3. HEADER & NAVIGATION
   ============================================ */

header {
    background-color: #ffffff;
    border-bottom: 1px solid #E5E5E5;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
}

.site-logo a {
    color: #000000;
}

.site-logo a:hover {
    color: #DC143C;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333333;
}

@media (max-width: 767px) {
    .menu-toggle {
        display: block;
    }
}

/* Navigation */
nav {
    display: flex;
}

@media (max-width: 767px) {
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        flex-direction: column;
        border-top: 1px solid #E5E5E5;
    }

    nav.active {
        display: flex;
    }
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

@media (max-width: 767px) {
    nav ul {
        flex-direction: column;
        gap: 0;
    }
}

nav a {
    display: block;
    padding: 0.5rem 0;
    color: #333333;
    font-weight: 500;
    transition: color 0.3s ease;
}

@media (max-width: 767px) {
    nav a {
        padding: 1rem 1rem;
    }
}

nav a:hover,
nav a.active {
    color: #DC143C;
}

/* ============================================
   3.1 HEADER RIGHT & SEARCH
   ============================================ */

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    flex: 1;
    justify-content: flex-end;
}

/* Hide nav when search is active */
.header-right.search-active #primary-menu {
    visibility: hidden;
    opacity: 0;
}

/* Search Toggle Button */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333333;
    transition: color 0.3s ease;
    padding: 0;
    flex-shrink: 0;
    z-index: 15;
}

.search-toggle:hover {
    color: #DC143C;
}

.search-toggle svg {
    width: 20px;
    height: 20px;
}

/* Search Overlay */
.search-overlay {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 40px;
    height: 44px;
    background-color: #ffffff;
    display: none;
    align-items: center;
    gap: 0;
    z-index: 12;
}

.search-overlay.active {
    display: flex;
}

.search-form {
    flex: 1;
    display: flex;
    height: 100%;
}

.search-input {
    width: 100%;
    height: 100%;
    padding: 0 1rem;
    border: 2px solid #DC143C;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    outline: none;
    background-color: #fff;
}

.search-input:focus {
    border-color: #DC143C;
    box-shadow: none;
}

.search-input::placeholder {
    color: #999;
}

/* Search Close Button */
.search-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 100%;
    background-color: #DC143C;
    border: 2px solid #DC143C;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    color: #ffffff;
    transition: background-color 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.search-close:hover {
    background-color: #B01030;
    border-color: #B01030;
}

.search-close svg {
    width: 18px;
    height: 18px;
}

/* Mobile adjustments for search */
@media (max-width: 767px) {
    .header-right {
        gap: 0.5rem;
    }

    .search-toggle {
        width: 36px;
        height: 36px;
    }

    .search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        transform: none;
        padding: 10px;
        padding-right: 0;
        background-color: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        z-index: 200;
    }

    .search-overlay .search-form {
        height: 40px;
    }

    .search-overlay .search-close {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }

    .search-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0 0.75rem;
        height: 40px;
    }
}

/* ============================================
   4. HERO / FEATURED SECTION
   ============================================ */

.featured-article {
    margin-bottom: 3rem;
    background-color: #F5F5F5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.featured-article-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .featured-article-image {
        height: 400px;
    }
}

.featured-article-content {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .featured-article-content {
        padding: 2rem;
    }
}

.featured-article h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .featured-article h2 {
        font-size: 2.5rem;
    }
}

.featured-article-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: #666666;
    margin-bottom: 1rem;
}

.featured-article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================
   5. CARDS
   ============================================ */

.card {
    background-color: #ffffff;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #DC143C;
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background-color: #F5F5F5;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-title a {
    color: #000000;
}

.card-title a:hover {
    color: #DC143C;
}

.card-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666666;
    margin-bottom: 0.75rem;
}

.card-meta span {
    display: inline-block;
}

.card-excerpt {
    font-size: 0.95rem;
    color: #666666;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Post tags */
.post-tags {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #E5E5E5;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.post-tags-label {
    font-weight: 600;
    color: #333333;
}

.post-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tags-list a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #E5E5E5;
    color: #333333;
}

.post-tags-list a:hover {
    background-color: #DC143C;
    color: #ffffff;
}

/* Attribution block */
.attribution {
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background-color: #F9F9F9;
    border: 1px dashed #E5E5E5;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #666666;
    text-align: left;
}

.attribution a {
    color: #0066CC;
    font-weight: 500;
}

.attribution a:hover {
    color: #DC143C;
}

/* ============================================
   6. SECTION HEADERS
   ============================================ */

.section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 3px solid #DC143C;
    padding-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.75rem;
    margin: 0;
}

@media (min-width: 768px) {
    .section-header h2 {
        font-size: 2rem;
    }
}

.section-header a {
    color: #0066CC;
    font-weight: 500;
    white-space: nowrap;
}

.section-header a:hover {
    color: #DC143C;
}

/* ============================================
   7. CATEGORY BADGES
   ============================================ */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background-color: #DC143C;
    color: #ffffff;
}

.badge-secondary {
    background-color: #E5E5E5;
    color: #333333;
}

.badge-info {
    background-color: #0066CC;
    color: #ffffff;
}

/* ============================================
   8. BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: #DC143C;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #B01030;
}

.btn-secondary {
    background-color: #E5E5E5;
    color: #333333;
}

.btn-secondary:hover {
    background-color: #D5D5D5;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #DC143C;
    color: #DC143C;
}

.btn-outline:hover {
    background-color: #DC143C;
    color: #ffffff;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================
   9. TYPOGRAPHY & UTILITIES
   ============================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #666666;
}

.text-danger {
    color: #DC143C;
}

.text-info {
    color: #0066CC;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }

/* ============================================
   10. MAIN & CONTENT
   ============================================ */

main {
    min-height: 60vh;
    padding: 2rem 0;
}

/* ============================================
   10.1 SIDEBAR & WIDGETS
   ============================================ */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar .widget {
    margin: 0;
    padding: 1.25rem;
    background-color: #ffffff;
    border: 1px solid #EDEDED;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.sidebar .widget-title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    letter-spacing: 0.2px;
    color: #111111;
}

.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.sidebar .widget a {
    color: #111111;
}

.sidebar .widget a:hover {
    color: #DC143C;
}

.sidebar .wp-block-latest-posts__list li {
    padding-bottom: 0.65rem;
    border-bottom: 1px dashed #E6E6E6;
}

.sidebar .wp-block-latest-posts__list li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar .wp-block-separator {
    margin: 0.85rem 0;
}


@media (max-width: 767px) {
    .sidebar {
        gap: 1rem;
    }

    .sidebar .widget {
        padding: 1rem;
        border-radius: 8px;
    }
}

/* ============================================
   11. FOOTER
   ============================================ */

footer {
    background-color: #333333;
    color: #E5E5E5;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

footer h3 {
    color: #ffffff;
}

footer a {
    color: #E5E5E5;
}

footer a:hover {
    color: #DC143C;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-widget h4 {
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #555555;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

/* ============================================
   12. PAGINATION
   ============================================ */

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    color: #0066CC;
    transition: all 0.3s ease;
}

.pagination .page-numbers.current {
    background-color: #DC143C;
    color: #ffffff;
    border-color: #DC143C;
}

.pagination a:hover {
    background-color: #F5F5F5;
}

/* ============================================
   13. FORMS
   ============================================ */

input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* ============================================
   13.1 COMMENTS
   ============================================ */

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #E5E5E5;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.5rem;
}

.comment-list .comment {
    background-color: #ffffff;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.comment-list .children {
    list-style: none;
    margin: 1rem 0 0 0;
    padding-left: 1.5rem;
    border-left: 2px solid #F0F0F0;
}

.comment-body {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0.75rem 1rem;
}

.comment-author img {
    border-radius: 999px;
}

.comment-author .fn {
    font-weight: 600;
    color: #000000;
}

.comment-metadata {
    font-size: 0.875rem;
    color: #666666;
}

.comment-metadata a {
    color: #666666;
}

.comment-metadata a:hover {
    color: #DC143C;
}

.comment-content {
    grid-column: 2;
    color: #333333;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #DC143C;
    border: 1px solid #DC143C;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.comment-reply-link:hover {
    background-color: #DC143C;
    color: #ffffff;
}

.comment-respond {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #F9F9F9;
    border-radius: 8px;
    border: 1px solid #E5E5E5;
}

.comment-reply-title {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.comment-form {
    display: grid;
    gap: 1rem;
}

.comment-form textarea {
    min-height: 140px;
    resize: vertical;
}

.comment-form input[type="submit"] {
    background-color: #DC143C;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.comment-form input[type="submit"]:hover {
    background-color: #B01030;
}

.comment-form .comment-form-cookies-consent {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.comment-form .comment-form-cookies-consent input {
    width: auto;
}

.no-comments {
    color: #666666;
    font-style: italic;
}

/* ============================================
   14. RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 767px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ============================================
   15. WORDPRESS BLOCK STYLES
   ============================================ */

.wp-block-image img {
    border-radius: 8px;
}

.wp-block-quote {
    border-left: 4px solid #DC143C;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
}

.wp-block-separator {
    background-color: #E5E5E5;
    margin: 2rem 0;
}

/* ============================================
   16. ACCESSIBILITY
   ============================================ */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #DC143C;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   17. ANIMATION
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}
