/*
Theme Name: Avocado
Theme URI: https://diffusedcreations.com
Description: A clean, minimal, typography-focused classic WordPress theme.
Author: kapengbarako
Version: 1.0.0
Text Domain: avocado
*/

:root {
    --text-color: #1a1a1a;
    --text-muted: #555555;
    --bg-color: #ffffff;
    --accent-color: #000000;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    padding: 30px 0;
    margin-bottom: 50px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 24px;
}

.main-navigation a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-navigation a:hover {
    color: var(--text-color);
}

/* Hero Section */
.hero-section {
    max-width: 800px;
    margin-bottom: 70px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 20px 0;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Post Grid Layout */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.post-card .post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 16 / 10;
    transition: opacity 0.3s ease;
}

.post-card .post-thumbnail:hover img {
    opacity: 0.85;
}

.entry-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 18px 0 10px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.entry-excerpt p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Single Post Readability */
.single-post-container {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.single-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.single-thumbnail {
    margin: 40px 0;
}

.single-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.post-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #222;
}

.post-content h2, .post-content h3 {
    margin-top: 40px;
    font-weight: 700;
}

/* Footer */
.site-footer {
    padding: 40px 0;
    border-top: 1px solid #eaeaea;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Archive Header */
.archive-header {
    margin-bottom: 60px;
    max-width: 800px;
}
.archive-description {
    margin-top: 15px;
}

/* Footer Menu Formatting */
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}
.footer-navigation a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}
.footer-navigation a:hover {
    color: var(--text-color);
}
.site-info {
    margin-top: 10px;
}


/* Search Bar Styles */
.header-search {
    display: flex;
    align-items: center;
}
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 12px;
    fill: var(--text-muted);
    width: 14px;
    height: 14px;
    pointer-events: none; /* Prevents the icon from blocking clicks */
}
.search-field {
    background-color: transparent;
    border: 1px solid #eaeaea; /* Light mode border */
    border-radius: 20px;
    padding: 8px 16px 8px 34px;
    font-size: 0.9rem;
    color: var(--text-color);
    font-family: var(--font-family);
    width: 160px;
    transition: all 0.3s ease;
}
.search-field:focus {
    outline: none;
    border-color: var(--text-muted);
    width: 200px; /* Expands smoothly on focus */
}
.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;
    width: 1px;
    word-wrap: normal !important;
}

/* Custom Typography Adjustments */
:root {
    --heading-font: var(--font-family); /* Fallback safety */
}

h1, h2, h3, h4, h5, h6, 
.site-title, 
.hero-title, 
.entry-title, 
.single-title {
    font-family: var(--heading-font);
}

/* Custom Logo Styling */
.custom-logo-link img {
    max-height: 40px; /* Constrain height to keep header slim */
    width: auto;
    display: block;
}

/* -----------------------------------------
   Dropdown Menu Styles 
----------------------------------------- */
/* Ensure the parent item acts as an anchor for the dropdown */
.main-navigation li {
    position: relative;
    display: flex;
    align-items: center;
}

/* Add the dropdown arrow icon using pseudo-elements */
.main-navigation li.menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
    border-top: 4px solid currentColor;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

/* Flip arrow on hover */
.main-navigation li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Hide the sub-menu by default and position it */
.main-navigation ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    display: none; /* Hidden */
    flex-direction: column;
    min-width: 200px;
    background-color: var(--bg-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-top: 3px solid var(--accent-color); /* Blue top border from image */
    padding: 10px 0;
    margin: 0;
    gap: 0; /* Remove gap from parent ul */
}

/* Dark mode adjustment for the dropdown shadow/border */
[data-theme="dark"] .main-navigation ul.sub-menu {
    background-color: #1f2937;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-top: 3px solid var(--text-color);
}

/* Show the dropdown when hovering over the parent list item */
.main-navigation li.menu-item-has-children:hover > ul.sub-menu {
    display: flex;
    animation: fade-in-down 0.2s ease forwards;
}

/* Style the links inside the dropdown */
.main-navigation ul.sub-menu li {
    width: 100%;
}

.main-navigation ul.sub-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 400;
}

/* Hover state for sub-menu items */
.main-navigation ul.sub-menu a:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--accent-color);
}

[data-theme="dark"] .main-navigation ul.sub-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Optional: Slight animation for smooth appearance */
@keyframes fade-in-down {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Increase Site Title Size */
.site-title {
    font-size: 2rem; /* Increased from 1.5rem */
    font-weight: 800;
}

/* -----------------------------------------
   Hero Section Grid Layout
----------------------------------------- */
/* Make the hero section span full width visually, but keep content contained */
.hero-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    background-color: #1a1a1a; /* Dark background matching the image */
    color: #ffffff; /* White text for contrast */
    padding: 60px;
    border-radius: 12px;
    max-width: 100%;
    margin-bottom: 70px;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.02) 0px,
        rgba(255, 255, 255, 0.02) 2px,
        transparent 2px,
        transparent 8px
    ); /* Subtle diagonal texture matching the screenshot */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-content-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 4.5rem; /* Large serif-style sizing */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 0 0 20px 0;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85); /* Slightly muted white */
    line-height: 1.6;
    max-width: 90%;
    margin: 0;
}

.hero-image-column {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.hero-custom-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 4 / 3; /* Maintains the landscape crop of the portrait */
    object-fit: cover;
    border-radius: 8px; /* Slightly rounded corners matching the image */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments for Desktop */
@media (min-width: 800px) {
    .hero-grid-layout {
        grid-template-columns: 1.2fr 1fr; /* Text gets slightly more space than image */
        align-items: center;
        padding: 80px;
    }
    
    .hero-image-column {
        border-left: 1px solid rgba(255, 255, 255, 0.1); /* Subtle divider line */
        padding-left: 60px;
    }
}
