/**
 * Custom Styles for Sita Duwal Portfolio Theme
 */

/* ===================================
   Base Styles & Typography
   =================================== */

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

/* Improve readability */
p {
    max-width: 70ch;
}

/* ===================================
   Layout & Grid
   =================================== */

.wp-block-columns {
    gap: 2rem;
}

@media (max-width: 781px) {
    .wp-block-columns {
        gap: 1.5rem;
    }
}

/* ===================================
   Navigation
   =================================== */

.wp-block-navigation {
    font-weight: 500;
}

.wp-block-navigation__responsive-container.is-menu-open {
    padding: 2rem;
}

.wp-block-navigation-item a {
    transition: color 0.2s ease;
}

.wp-block-navigation-item a:hover {
    color: var(--wp--preset--color--accent);
}

/* Sticky Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ===================================
   Buttons
   =================================== */

.wp-block-button__link {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wp-block-button.is-style-outline .wp-block-button__link {
    border: 2px solid currentColor;
    background: transparent !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--wp--preset--color--contrast) !important;
    color: var(--wp--preset--color--white) !important;
    border-color: var(--wp--preset--color--contrast);
}

/* ===================================
   Cards & Boxes
   =================================== */

.project-card,
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border-radius: 4px;
}

.project-card:hover,
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Project Grid */
.wp-block-query .wp-block-post-template {
    list-style: none;
    padding: 0;
}

.wp-block-post-featured-image {
    overflow: hidden;
}

.wp-block-post-featured-image img {
    transition: transform 0.4s ease;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-block-post-featured-image:hover img {
    transform: scale(1.05);
}

/* ===================================
   Stats Section (Counter Animation)
   =================================== */

.stats-section {
    text-align: center;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--wp--preset--color--accent);
    line-height: 1;
}

/* ===================================
   Forms
   =================================== */

.contact-form {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--wp--preset--color--sand);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--wp--preset--color--white);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--accent);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--wp--preset--color--contrast);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-required {
    color: var(--wp--preset--color--accent);
}

/* Honeypot field (hidden from users) */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.form-message {
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===================================
   Hero Section
   =================================== */

.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section h1 {
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

/* ===================================
   Cover Blocks & Overlays
   =================================== */

.wp-block-cover {
    background-size: cover;
    background-position: center;
}

.wp-block-cover__inner-container {
    width: 100%;
}

/* ===================================
   Separator
   =================================== */

.wp-block-separator {
    margin: 2rem 0;
    border: none;
    height: 2px;
}

/* ===================================
   Post Meta & Taxonomy Terms
   =================================== */

.wp-block-post-terms {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.wp-block-post-terms a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.wp-block-post-terms a:hover {
    color: var(--wp--preset--color--accent);
}

/* ===================================
   Pagination
   =================================== */

.wp-block-query-pagination {
    gap: 1rem;
}

.wp-block-query-pagination-numbers {
    gap: 0.5rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wp-block-query-pagination a:hover,
.wp-block-query-pagination .page-numbers.current {
    background: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--white);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 781px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .wp-block-columns {
        flex-direction: column;
    }
    
    .wp-block-column {
        flex-basis: 100% !important;
    }
    
    .wp-block-post-template.is-flex-container {
        flex-direction: column;
    }
    
    .wp-block-query .wp-block-post-template {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .wp-block-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wp-block-button {
        width: 100%;
    }
}

/* ===================================
   Performance & Accessibility
   =================================== */

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

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--white);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .wp-block-navigation,
    .wp-block-button,
    footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ===================================
   Loading States
   =================================== */

.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===================================
   Custom Utility Classes
   =================================== */

.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
