/**
 * Theme Name: Daisy Gold
 * Author: Mehraz Morshed
 * Author URI: https://mehrazmorshed.com
 * Description: A responsive WordPress classic theme with golden accents.
 * Version: 1.0
 * Tested up to: 6.7
 * Requires PHP: 7.4
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: daisy-gold
 * Tags: blog, news, custom-logo, featured-images, threaded-comments, translation-ready
 */

/**
 ***************
 * STYLE INDEX
 ***************
 * 
 * 1.0 - Reset & Basic Styles
 * 2.0 - Header & Branding
 * 3.0 - Navigation System
 * 4.0 - Main Content Layout
 * 5.0 - Post & Article Styles
 * 6.0 - Footer Styles
 * 7.0 - WordPress Core Classes
 * 8.0 - Comments System
 * 9.0 - Pagination
 * 10.0 - Tags & Taxonomies
 * 11.0 - Custom Header Support
 * 12.0 - Block Editor Styles
 * 13.0 - Responsive Design
 */

/**
 * Copyright 2024 Mehraz Morshed
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * any later version.
 */

/******************************
 * 1.0 - Reset & Basic Styles 
 ******************************/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Poppins:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f9f9f9;
}

a {
    text-decoration: none;
    color: #e49b0f;
    transition: all 0.3s ease;
}

a:hover {
    color: #c5850d;
}

/***************************
 * 2.0 - Header & Branding
 ***************************/

.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 12px 5%; /* Reduced from 20px */
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px; /* Added fixed height */
}

.site-branding {
    text-align: left;
    padding: 4px 0; /* Reduced padding */
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-size: 25px; /* Reduced from 2.5rem (40px) */
    color: #e49b0f;
    margin-bottom: 2px; /* Reduced from 0.5rem */
    line-height: 1.2;
}

.site-description {
    font-size: 12px; /* Maintained as requested */
    color: #777;
    line-height: 1.3;
}

/***************************
 * 3.0 - Navigation System
 ***************************/

.main-navigation {
    display: block;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    padding: 8px 12px; /* Reduced from 10px 15px */
    font-weight: 600;
    font-size: 15px; /* Slightly smaller nav items */
}

/* Dropdown menus */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.main-navigation li:hover > ul {
    opacity: 1;
    visibility: visible;
}

.main-navigation ul ul ul {
    left: 100%;
    top: 0;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    display: block;
    width: 24px;
    height: 2px;
    background: #e49b0f;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/*****************************
 * 4.0 - Main Content Layout
 *****************************/

.site-content {
    max-width: 1600px;
    margin: 30px auto;
    padding: 0 4%;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
}

/*******************************
 * 5.0 - Post & Article Styles
 *******************************/

.post {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.post:hover {
    transform: translateY(-5px);
}

.post-content {
    order: 1;
    padding: 20px 20px 0;
}

.post-title {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 10px;
    font-family: 'Playfair Display', serif;
}

.post-title a {
    color: #333;
    text-decoration: none;
}

.post-title a:hover {
    color: #e49b0f;
}

.post-thumbnail {
    order: 2;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post:hover .post-thumbnail img {
    transform: scale(1.03);
}

.post-excerpt {
    order: 3;
    padding: 0 10px 10px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
}

.read-more {
    display: inline-block;
/*    margin-top: 15px;*/
    font-size: 14px;
    color: #e49b0f;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

/***********************
 * 6.0 - Footer Styles
 ***********************/

.site-footer {
    background: #222;
    color: #fff;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

/*******************************
 * 7.0 - WordPress Core Classes
 *******************************/

.wp-caption {
    margin-bottom: 1.5em;
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875em;
    text-align: center;
    margin: 0.5em 0;
    color: #666;
}

.sticky {
    border-left: 3px solid #e49b0f;
    padding-left: 15px;
}

.gallery-caption,
.bypostauthor {
    display: block;
}

.alignright {
    float: right;
    margin-left: 1em;
    margin-bottom: 1em;
}

.alignleft {
    float: left;
    margin-right: 1em;
    margin-bottom: 1em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1em;
}

.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;
}

/************************
 * 8.0 - Comments System
 ************************/
.comments-area {
    margin-top: 50px;
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-body {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

/********************
 * 9.0 - Pagination 
 ********************/

.pagination {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0;
    margin-top: 30px;
}

.page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 3px;
    background: #f5f5f5;
    border-radius: 3px;
}

.page-numbers.current {
    background: #e49b0f;
    color: #fff;
}

/****************************
 * 10.0 - Tags & Taxonomies
 ****************************/

.post-tags {
    margin: 30px 0 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tags-label {
    font-weight: bold;
    margin-right: 10px;
    color: #e49b0f;
}

.tag-link {
    display: inline-block;
    background: #f5f5f5;
    color: #e49b0f;
    padding: 3px 10px;
    margin-right: 5px;
    margin-bottom: 5px;
    border-radius: 3px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: #e49b0f;
    color: #fff;
}

/********************************
 * 11.0 - Custom Header Support
 ********************************/

.site-header.custom-header {
    background-size: cover;
    background-position: center;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.site-header.custom-header .site-title a,
.site-header.custom-header .site-description {
    color: inherit;
}

/******************************
 * 12.0 - Block Editor Styles 
 ******************************/

.wp-block-button.is-style-gold-button .wp-block-button__link {
    background-color: #e49b0f;
    color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.wp-block-button.is-style-gold-button .wp-block-button__link:hover {
    background-color: #c5850d;
}

/*****************************
 * 13.0 - Responsive Design 
 *****************************/

@media (max-width: 1440px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .site-header {
        flex-wrap: wrap;
        padding: 15px 5%;
    }
    
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .main-navigation {
        order: 3;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .main-navigation.active {
        max-height: 1000px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        padding: 20px 0;
    }
    
    .main-navigation ul ul {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        padding-left: 20px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .site-content {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .posts-grid {
        gap: 15px;
    }
    
    .site-title {
        font-size: 2rem;
    }
}