/*
Theme Name: Twenty Twenty-Five Child
Description: Child theme for the Twenty Twenty-Five theme
Author: Your Name
Template: twentytwentyfive
Version: 1.0.0
Text Domain: twentytwentyfive-child
*/

/* ==========================================================================
   Custom Styles for Twenty Twenty-Five Child Theme
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Merriweather:ital,wght@0,400;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Custom Global Styles */
:root {
    --smooth-transition: all 0.3s ease;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--wp--preset--color--accent-2);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Smooth Transitions */
a,
button,
.wp-block-button__link {
    transition: var(--smooth-transition);
}

/* Enhanced Card Styles */
.wp-block-group.is-style-card,
.wp-block-column {
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-group.is-style-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Custom Box Shadows */
.has-shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.has-shadow-lg {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* Enhanced Image Styles */
.wp-block-image img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-image:hover img {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Custom Button Enhancements */
.wp-block-button__link {
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: none;
    box-shadow: 0 2px 8px rgba(15, 76, 129, 0.2);
}

.wp-block-button__link:hover {
    box-shadow: 0 4px 12px rgba(0, 168, 204, 0.3);
    transform: translateY(-1px);
}

/* Custom Input Field Styles */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
textarea,
select {
    border-radius: 6px !important;
    padding: 12px 16px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    border-color: var(--wp--preset--color--accent-1) !important;
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

/* Enhanced Code Block Styles */
pre,
.wp-block-code {
    border-radius: 8px;
    padding: 20px !important;
    overflow-x: auto;
}

code {
    background-color: rgba(26, 26, 46, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Custom Table Styles */
.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table th {
    background-color: var(--wp--preset--color--accent-1);
    color: var(--wp--preset--color--base);
    font-weight: 600;
}

.wp-block-table tr:nth-child(even) {
    background-color: rgba(15, 76, 129, 0.03);
}

.wp-block-table tr:hover {
    background-color: rgba(0, 168, 204, 0.08);
}

/* Custom List Styles */
ul:not(.wp-block-categories-list):not(.wp-block-page-list) li::marker {
    color: var(--wp--preset--color--accent-1);
}

ol li::marker {
    color: var(--wp--preset--color--accent-2);
    font-weight: 600;
}

/* Enhanced Blockquote */
.wp-block-quote,
.wp-block-pullquote {
    position: relative;
}

.wp-block-pullquote blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--wp--preset--color--accent-1);
    opacity: 0.2;
    position: absolute;
    left: -20px;
    top: -10px;
    font-family: Georgia, serif;
}

/* Custom Navigation Enhancements */
.wp-block-navigation-item a {
    position: relative;
}

.wp-block-navigation-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--wp--preset--color--accent-1);
    transition: width 0.3s ease;
}

.wp-block-navigation-item a:hover::after {
    width: 100%;
}

/* Post Meta Styling */
.wp-block-post-date,
.wp-block-post-author,
.wp-block-post-terms {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Custom Separator Styles */
.wp-block-separator {
    opacity: 0.3;
}

.wp-block-separator.is-style-wide {
    max-width: 100% !important;
}

/* Search Block Enhancement */
.wp-block-search__input {
    border-radius: 6px 0 0 6px !important;
}

.wp-block-search__button {
    border-radius: 0 6px 6px 0 !important;
}

/* Custom Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Custom Selection Color */
::selection {
    background-color: var(--wp--preset--color--accent-4);
    color: var(--wp--preset--color--base);
}

::-moz-selection {
    background-color: var(--wp--preset--color--accent-4);
    color: var(--wp--preset--color--base);
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .wp-block-columns {
        gap: var(--wp--preset--spacing--40) !important;
    }

    h1, .wp-block-post-title {
        font-size: clamp(2rem, 8vw, 3rem) !important;
    }
}

/* Print Styles */
@media print {
    .wp-block-navigation,
    .wp-block-search,
    .wp-block-button {
        display: none;
    }
}

/* ==========================================================================
   Hide Unnecessary Design Elements
   ========================================================================== */

/* Hide Site Tagline (often redundant with description) */
.wp-block-site-tagline {
    display: none;
}

/* Hide Post Author (uncomment if you want to show it) */
.wp-block-post-author {
    display: none;
}

/* Hide Post Date on Archive Pages (uncomment to hide everywhere) */
.archive .wp-block-post-date,
.search .wp-block-post-date {
    display: none;
}

/* Hide Categories/Tags on Excerpts (keep on single posts) */
.archive .wp-block-post-terms,
.search .wp-block-post-terms {
    display: none;
}

/* Hide Featured Image on Archive/Blog Pages (uncomment to enable) */
/*
.archive .wp-block-post-featured-image,
.blog .wp-block-post-featured-image {
    display: none;
}
*/

/* Hide Comments Count (uncomment to hide) */
/*
.wp-block-post-comments-count {
    display: none;
}
*/

/* Hide Comment Form on Specific Pages (uncomment to enable) */
/*
.page .wp-block-post-comments-form {
    display: none;
}
*/

/* Hide Search Block in Sidebar (uncomment to hide) */
/*
.wp-block-template-part .wp-block-search {
    display: none;
}
*/

/* Hide Post Navigation (Previous/Next links) */
/*
.wp-block-post-navigation-link {
    display: none;
}
*/

/* Hide Sidebar Completely (uncomment to hide) */
/*
.wp-block-template-part[data-area="sidebar"],
[class*="sidebar"] {
    display: none;
}
*/

/* Hide Footer Widgets/Columns (uncomment to hide) */
/*
.wp-block-template-part[data-area="footer"] .wp-block-columns {
    display: none;
}
*/

/* Hide Specific Navigation Menu Items by Class */
/*
.wp-block-navigation-item.hide-on-mobile {
    display: none;
}
*/

/* Hide RSS/Social Links in Footer (uncomment to hide) */
/*
.wp-block-template-part[data-area="footer"] .wp-block-social-links {
    display: none;
}
*/

/* Hide Query Pagination on Specific Pages */
/*
.page .wp-block-query-pagination {
    display: none;
}
*/

/* Hide Post Excerpt "Read More" link styling (uncomment to hide) */
/*
.wp-block-post-excerpt__more-link {
    display: none;
}
*/

/* Hide Archive Title Prefix ("Category:", "Tag:", etc.) */
.wp-block-query-title .taxonomy-description::before,
.archive-title::before {
    display: none;
}

/* Clean up archive titles */
.wp-block-query-title {
    text-transform: capitalize;
}

/* Hide WordPress branding in footer */
.powered-by,
a[href*="wordpress.org"][rel="nofollow"] {
    display: none !important;
}

/* Hide any "Designed with WordPress" or "Proudly powered by" text */
p:has(a[href*="wordpress.org"]) {
    display: none !important;
}

/* ==========================================================================
   Responsive Video Embeds (YouTube, Vimeo, etc.)
   ========================================================================== */

/* Responsive video wrapper for embeds */
.responsive-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    margin: var(--wp--preset--spacing--40) 0;
}

.responsive-video-wrapper iframe,
.responsive-video-wrapper object,
.responsive-video-wrapper embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* Widget area embed styling */
.widget-area .responsive-video-wrapper,
.wp-block-widget-area .responsive-video-wrapper {
    margin: var(--wp--preset--spacing--30) 0;
}

/* Ensure embeds in widgets are responsive */
.widget iframe,
.wp-block-widget-area iframe {
    max-width: 100%;
    height: auto;
}

/* YouTube embed specific styling */
.widget .wp-block-embed-youtube,
.wp-block-widget-area .wp-block-embed-youtube {
    margin: var(--wp--preset--spacing--30) 0;
}

/* General embed block styling */
.wp-block-embed {
    margin: var(--wp--preset--spacing--40) 0;
}

.wp-block-embed iframe {
    border-radius: 8px;
}

/* Sidebar video embeds */
.sidebar .wp-block-embed,
.widget .wp-block-embed {
    margin: var(--wp--preset--spacing--30) 0;
}

/* Hide "Powered by WordPress" and similar branding in footer */
.powered-by,
.site-info a[href*="wordpress.org"],
[href*="wordpress.org"][rel="nofollow"] {
    display: none !important;
}

/* Hide any paragraph containing WordPress branding */
p:has(a[href*="wordpress.org"]) {
    display: none !important;
}
