/**
 * WebAgency Custom Styles
 * Additional styles that complement the main stylesheet
 */

/* Loading spinner for forms */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Form success message */
.form-success {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28c840 0%, #22a535 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
}

.form-success h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--color-black);
}

.form-success p {
    color: var(--color-gray);
}

/* Post card hover effect */
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 1rem;
    background: white;
    border: 1px solid var(--color-cream-darker);
    border-radius: var(--border-radius-md);
    color: var(--color-black);
    font-weight: 500;
    transition: all var(--transition-normal);
}

.pagination a:hover {
    background: var(--color-cream);
    border-color: var(--color-brown-light);
}

.pagination .current {
    background: linear-gradient(135deg, var(--color-brown) 0%, var(--color-gold) 100%);
    border-color: transparent;
    color: white;
}

/* WordPress 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;
}

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

.gallery-item {
    margin: 0;
}

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

/* Blockquote styling */
blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--color-cream);
    border-left: 4px solid var(--color-brown);
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-style: normal;
    color: var(--color-gray);
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-cream-darker);
}

th {
    font-weight: 600;
    background: var(--color-cream);
}

tr:hover {
    background: var(--color-cream);
}

/* Form styling for WordPress comments */
.comment-form {
    max-width: 600px;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-cream-darker);
    border-radius: var(--border-radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-brown);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.comment-form .form-submit input {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--color-brown) 0%, var(--color-gold) 100%);
    color: white;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.comment-form .form-submit input:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Comment styling */
.comment-list {
    margin: 2rem 0;
}

.comment {
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.comment-metadata {
    font-size: 0.85rem;
    color: var(--color-gray);
    margin-bottom: 1rem;
}

.comment-content {
    color: var(--color-black-light);
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--color-brown);
    font-weight: 500;
}

/* Widget styling */
.widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-cream);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-cream);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--color-black-light);
    transition: color var(--transition-normal);
}

.widget a:hover {
    color: var(--color-brown);
}

/* Search widget */
.widget_search .search-form {
    display: flex;
    gap: 0.5rem;
}

.widget_search input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-cream-darker);
    border-radius: var(--border-radius-md);
    font-family: inherit;
}

.widget_search button {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--color-brown) 0%, var(--color-gold) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
}

/* Tag cloud */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tagcloud a {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--color-cream);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem !important;
    color: var(--color-black-light);
    transition: all var(--transition-normal);
}

.tagcloud a:hover {
    background: var(--color-brown);
    color: white;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--color-gray);
}

.breadcrumbs a {
    color: var(--color-gray);
}

.breadcrumbs a:hover {
    color: var(--color-brown);
}

.breadcrumbs .current {
    color: var(--color-brown);
}

/* Accessibility */
.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;
}

.screen-reader-text:focus {
    background-color: var(--color-cream);
    clip: auto !important;
    clip-path: none;
    color: var(--color-black);
    display: block;
    font-size: 1rem;
    height: auto;
    left: 5px;
    padding: 15px 23px 14px;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-brown);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-md);
    z-index: 999999;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 20px;
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .hero-visual,
    .testimonials-nav,
    .btn {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
    
    .section {
        padding: 1rem 0;
    }
}
