/* FILE: assets/css/main.css */
/*
 * Main stylesheet for Özcanoğlu Makina theme.
 * Extended styles imported from style.css via wp_enqueue.
 * This file contains additional component overrides and utilities.
 */

/* =========================================================
   HEADER YELLOW ACCENT LINE
   ========================================================= */
.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-primary);
    transition: width 0.6s ease;
}

.site-header.scrolled::after {
    width: 100%;
}

/* =========================================================
   NAV ACTIVE HIGHLIGHT
   ========================================================= */
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-page-ancestor > a,
.main-navigation ul li.current_page_item > a {
    color: var(--color-primary-dark);
    font-weight: var(--font-weight-bold);
}

/* =========================================================
   SERVICE CARD IMAGE BG VARIANT
   ========================================================= */
.service-card--has-image {
    padding: 0;
    overflow: hidden;
}

.service-card--has-image .service-card__image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.service-card--has-image .service-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card--has-image:hover .service-card__image img {
    transform: scale(1.07);
}

.service-card--has-image .service-card__body {
    padding: var(--spacing-xl);
}

/* =========================================================
   PRODUCT FILTER ANIMATION
   ========================================================= */
.product-card.filter-hidden {
    display: none;
}

.product-card.filter-visible {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

/* =========================================================
   FORM LOADING STATE
   ========================================================= */
.contact-form.loading .btn[type="submit"] {
    opacity: 0.7;
    pointer-events: none;
}

.contact-form.loading .btn[type="submit"] .btn-text::after {
    content: '…';
}

/* =========================================================
   SCROLL REVEAL DELAYS (stagger children)
   ========================================================= */
.services-grid .service-card:nth-child(1) { transition-delay: 0.0s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.1s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.2s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.3s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.4s; }
.services-grid .service-card:nth-child(6) { transition-delay: 0.5s; }

.products-grid .product-card:nth-child(1) { transition-delay: 0.0s; }
.products-grid .product-card:nth-child(2) { transition-delay: 0.1s; }
.products-grid .product-card:nth-child(3) { transition-delay: 0.2s; }
.products-grid .product-card:nth-child(4) { transition-delay: 0.3s; }
.products-grid .product-card:nth-child(5) { transition-delay: 0.4s; }
.products-grid .product-card:nth-child(6) { transition-delay: 0.5s; }

/* =========================================================
   CUSTOMIZER ADMIN OVERRIDES (front-end highlight)
   ========================================================= */
.customize-partial-edit-shortcut {
    z-index: 10000;
}

/* =========================================================
   PRINT STYLES
   ========================================================= */
@media print {
    .topbar,
    .site-header,
    .site-footer,
    .floating-actions,
    .cookie-bar,
    .mobile-drawer,
    .overlay-backdrop,
    .hero-controls,
    .hero-nav-btn,
    .back-to-top,
    .whatsapp-btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a { color: #000; text-decoration: underline; }

    .container { max-width: 100%; padding: 0; }
    .section   { padding: 20pt 0; }
}

/* =========================================================
   WP BLOCK / GUTENBERG BASE COMPAT
   ========================================================= */
.wp-block-image img {
    border-radius: var(--radius-md);
}

.wp-block-quote {
    border-left: 4px solid var(--color-primary);
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--color-bg-subtle);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--color-accent);
}

.wp-block-button .wp-block-button__link {
    background: var(--color-primary);
    color: var(--color-secondary);
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    padding: 12px 28px;
    transition: all 0.25s ease;
}

.wp-block-button .wp-block-button__link:hover {
    background: var(--color-primary-dark);
}

.wp-block-separator {
    border-color: var(--color-border);
}

/* =========================================================
   SEARCH FORM
   ========================================================= */
.search-form {
    display: flex;
    gap: 8px;
}

.search-field {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    outline: none;
    transition: border-color 0.25s;
}

.search-field:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255,193,7,0.15);
}

.search-submit {
    padding: 10px 18px;
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: background 0.25s;
}

.search-submit:hover { background: var(--color-primary-dark); }

/* =========================================================
   COMMENT STYLES
   ========================================================= */
.comments-area {
    margin-top: var(--spacing-3xl);
    padding-top: var(--spacing-2xl);
    border-top: 1px solid var(--color-border-light);
}

.comments-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-xl);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.comment {
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    border-left: 3px solid var(--color-border);
}

.comment.bypostauthor {
    border-left-color: var(--color-primary);
}

.comment-author .fn {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary);
}

.comment-metadata {
    font-size: var(--font-size-xs);
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
}

.comment-content p {
    font-size: var(--font-size-sm);
    color: var(--color-text);
    margin-bottom: 0;
}

.reply a {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comment-respond {
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
}

.comment-respond h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-lg);
}

.comment-form label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-secondary);
    margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    font-size: var(--font-size-base);
    font-family: var(--font-body);
    color: var(--color-text);
    transition: border-color 0.25s;
    outline: none;
    margin-bottom: var(--spacing-md);
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255,193,7,0.15);
}

.comment-form textarea { min-height: 120px; resize: vertical; }

.form-submit input[type="submit"] {
    padding: 12px 28px;
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all 0.25s;
}

.form-submit input[type="submit"]:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* =========================================================
   ACCESSIBILITY FOCUS STYLES
   ========================================================= */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

/* =========================================================
   LOADING SKELETON (optional placeholder)
   ========================================================= */
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* =========================================================
   ABOUT SECTION EXTRA: Yellow top border on feature icons on hover
   ========================================================= */
.about-feature:hover .about-feature__icon {
    background: var(--color-primary);
}

.about-feature:hover .about-feature__icon .dashicons {
    color: var(--color-secondary);
}

/* =========================================================
   PRODUCT SPECS TABLE — zebra rows
   ========================================================= */
.product-specs-table tr:nth-child(even) td {
    background: var(--color-bg-subtle);
}

/* =========================================================
   PAGINATION ENHANCEMENTS
   ========================================================= */
.pagination .prev.page-numbers,
.pagination .next.page-numbers {
    font-size: 18px;
}

/* =========================================================
   CONTACT FORM ANIMATION
   ========================================================= */
@keyframes formSuccess {
    0%   { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1);    opacity: 1; }
}

.form-message.success {
    animation: formSuccess 0.4s ease forwards;
}

/* =========================================================
   ADMIN BAR COMPENSATION
   ========================================================= */
.admin-bar .topbar {
    margin-top: 0;
}

.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* =========================================================
   HERO SLIDE CONTENT HIDING (non-active)
   ========================================================= */
.hero-content.hidden {
    display: none;
}

/* =========================================================
   CUSTOM SCROLLBAR
   ========================================================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-subtle);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* =========================================================
   SELECTION COLOR
   ========================================================= */
::selection {
    background: var(--color-primary);
    color: var(--color-secondary);
}

::-moz-selection {
    background: var(--color-primary);
    color: var(--color-secondary);
}
