/**
 * Additional Styles for Mishaamir Theme
 * Loaded after style.css
 *
 * @package Mishaamir
 * @since 1.0.0
 */

/* ===================================
   Utility Classes
   =================================== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

.skip-link {
    background-color: #f1f1f1;
    box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.2);
    color: #21759b;
    display: block;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    left: -9999em;
    outline: none;
    padding: 15px 23px 14px;
    text-decoration: none;
    text-transform: none;
    top: -9999em;
}

.skip-link:focus {
    clip: auto;
    height: auto;
    left: 6px;
    top: 7px;
    width: auto;
    z-index: 100000;
}

/* ===================================
   Scroll to Top Button
   =================================== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-black);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.scroll-to-top:hover {
    background-color: var(--accent-gold);
    transform: translateY(0);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.page-loaded .hero-content {
    animation: fadeIn 1s ease-out;
}

/* ===================================
   Form Styles
   =================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--white);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.1);
}

input.error,
textarea.error,
select.error {
    border-color: #dc3545;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* ===================================
   WordPress Specific Styles
   =================================== */

/* Alignments */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: 100%;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* Captions */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption img {
    display: block;
    margin: 0 auto;
}

.wp-caption-text {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    color: var(--text-light);
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Comments */
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-body {
    padding: 1.5rem;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-metadata {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.reply {
    margin-top: 1rem;
}

.comment-reply-link {
    font-size: 0.9rem;
    color: var(--accent-gold);
}

/* Pagination */
.pagination,
.posts-navigation,
.post-navigation {
    margin-top: 3rem;
    text-align: center;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    transition: var(--transition);
}

.page-numbers:hover,
.page-numbers.current {
    background-color: var(--primary-black);
    color: var(--white);
    border-color: var(--primary-black);
}

/* ===================================
   Mobile Menu Styles
   =================================== */
body.menu-open {
    overflow: hidden;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===================================
   Loading State
   =================================== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .site-header,
    .main-navigation,
    .site-footer,
    .scroll-to-top,
    .btn,
    .social-links {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
    }
}

/* ===================================
   Accessibility Enhancements
   =================================== */
*:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-black: #000000;
        --text-dark: #000000;
        --border-color: #000000;
    }

    .btn {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================================
   Custom Post Types
   =================================== */
.service-meta {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.service-price {
    font-weight: 600;
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.service-duration {
    color: var(--text-light);
}

/* ===================================
   Error Pages
   =================================== */
.error-404 .site-main {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 0;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

/* ===================================
   Additional Responsive Styles
   =================================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
}

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

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}