/*
Theme Name: Sasipea
Description: A modern, responsive WordPress theme for personal websites
Version: 1.0
Author: Sasipea
Text Domain: sasipea
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

/* Juuksurite lehtede tutvustuse lõigud – säilita Enteriga tehtud vahed */
.single-juuksurid .elementor p {
    margin-bottom: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }





/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.site-description {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a:hover {
    color: #2563eb;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Menu icons - only affects links that have icons */
.main-navigation a.has-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.main-navigation .menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.main-navigation .menu-icon i {
    font-size: 24px;
    line-height: 1;
}

.main-navigation .menu-icon svg {
    width: 24px !important;
    height: 24px !important;
    fill: currentColor;
    display: block;
    max-width: 24px;
    max-height: 24px;
}

.main-navigation .menu-icon.menu-icon-svg svg {
    width: 24px !important;
    height: 24px !important;
    fill: currentColor;
    display: block;
    max-width: 24px;
    max-height: 24px;
}

.main-navigation .menu-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    max-width: 24px;
    max-height: 24px;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* Main content */
.site-main {
    padding: 2rem 0;
    min-height: 60vh;
}

/* Posts */
.post {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.post-title {
    margin-bottom: 1rem;
}

.post-title a {
    color: #1a1a1a;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: #555;
    line-height: 1.7;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.read-more:hover {
    background: #1d4ed8;
    color: #fff;
}

/* Sasipea buttons - same style for all buttons */
.sasipea-btn,
.sasipea-btn-primary,
a.sasipea-btn,
button.sasipea-btn {
    background: #E3A742;
    color: #000;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.sasipea-btn:hover,
.sasipea-btn-primary:hover,
a.sasipea-btn:hover,
button.sasipea-btn:hover {
    background: #9B9575;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(180, 174, 146, 0.3);
    text-decoration: none;
}

/* Heading styles for homepage */
.homepage-heading,
.front-page-heading {
    font-family: 'Red Hat Display', sans-serif;
}

.homepage-text,
.front-page-text {
    font-family: 'Manrope', sans-serif;
}

/* Homepage section styles */
.sasipea-homepage-section {
    padding: 60px 0;
    background: #fff;
}

.sasipea-homepage-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.sasipea-homepage-content .homepage-heading {
    font-family: 'Red Hat Display', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.sasipea-homepage-content .homepage-text {
    font-family: 'Manrope', sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.sasipea-homepage-content .sasipea-btn {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .sasipea-homepage-content .homepage-heading {
        font-size: 2rem;
    }
    
    .sasipea-homepage-content .homepage-text {
        font-size: 1rem;
    }
}

/* Single post */
.single-post .post {
    max-width: 800px;
    margin: 0 auto 2rem;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Sidebar */
.sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.widget {
    margin-bottom: 2rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

/* Footer */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

.footer-content p {
    margin-bottom: 0.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation {
        width: 100%;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-navigation a {
        display: block;
        padding: 1rem 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .post {
        padding: 1.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.4rem; }
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Comments */
.comments-area {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.comment-list {
    list-style: none;
}

.comment {
    border-bottom: 1px solid #f0f0f0;
    padding: 1rem 0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 600;
    color: #1a1a1a;
}

.comment-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.comment-content {
    line-height: 1.6;
}

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

.search-field {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-submit {
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.search-submit:hover {
    background: #1d4ed8;
}

/* Additional styles for new templates */

/* 404 page */
.error-404 {
    text-align: center;
    padding: 3rem 0;
}

.error-actions {
    margin: 2rem 0;
}

.error-actions .button {
    display: inline-block;
    margin: 0 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.error-actions .button:hover {
    background: #1d4ed8;
    color: #fff;
}

.error-actions .button.secondary {
    background: #6b7280;
}

.error-actions .button.secondary:hover {
    background: #4b5563;
}

.search-section,
.recent-posts,
.categories-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-section h2,
.recent-posts h2,
.categories-section h2 {
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.recent-posts ul,
.categories-section ul {
    list-style: none;
    padding: 0;
}

.recent-posts li,
.categories-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.recent-posts li:last-child,
.categories-section li:last-child {
    border-bottom: none;
}

/* Archive pages */
.page-header {
    margin-bottom: 2rem;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}

.page-title {
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.archive-description {
    color: #666;
    font-size: 1.1rem;
}

/* Search results */
.search-suggestions {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.search-suggestions h3 {
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.search-suggestions ul {
    list-style: disc;
    margin-left: 1.5rem;
}

.search-suggestions li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* Post navigation */
.post-navigation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.nav-previous a,
.nav-next a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    color: #333;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: #e9ecef;
}

/* Author bio */
.author-bio {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-info img {
    border-radius: 50%;
}

.author-details h4 {
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.author-details p {
    color: #666;
    margin: 0;
}

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

.tag-link {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f0f0f0;
    color: #333;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.tag-link:hover {
    background: #2563eb;
    color: #fff;
}

/* Category count */
.category-count {
    color: #666;
    font-size: 0.9rem;
}

/* Button styles */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.button:hover {
    background: #1d4ed8;
    color: #fff;
}

/* Screen reader text */
.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;
}

/* Focus styles for accessibility - removed outline to prevent blue border */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: none;
}

/* Pagination */
.navigation.pagination {
    margin: 2rem 0;
    text-align: center;
}

.nav-links {
    display: inline-flex;
    gap: 0.5rem;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* No sidebar layout */
.no-sidebar .site-main {
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
    }
    
    .error-actions .button {
        display: block;
        margin: 0.5rem 0;
    }
    
    .page-header {
        padding: 1.5rem;
    }
}

/* Styling for juuksurid lemmikud (non-Elementor template) */
.favorites-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.favorite-item {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #007cba;
    border-radius: 20px;
    color: #007cba;
    font-size: 14px;
    font-weight: 500;
    margin: 5px 5px 5px 0;
    transition: all 0.3s ease;
}

.favorite-item:hover {
    background: #007cba;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

/* Elementor CTA: show button only on hover (scoped to container e299b76) */
.elementor-element-e299b76 .elementor-cta__button-wrapper {
	opacity: 0;
	transform: translateY(6px);
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.elementor-element-e299b76 .elementor-cta:hover .elementor-cta__button-wrapper,
.elementor-element-e299b76 .elementor-cta:focus-within .elementor-cta__button-wrapper {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.menu-icon-svg{
width:25px !important;
}

/* Cart badge color */
.sasipea-cart-badge {
    background: #E3A742 !important;
}

/* Grow effect on hover for elements with #grow id */
#grow,
[id="grow"],
.elementor-element[id="grow"],
.elementor-widget[id="grow"],
.elementor-element-wrapper[id="grow"],
.elementor-widget-container[id="grow"] {
    transition: transform 0.3s ease !important;
    transform-origin: center center !important;
    will-change: transform;
    display: block;
}

#grow:hover,
[id="grow"]:hover,
.elementor-element[id="grow"]:hover,
.elementor-widget[id="grow"]:hover,
.elementor-element-wrapper[id="grow"]:hover,
.elementor-widget-container[id="grow"]:hover {
    transform: scale(1.05) !important;
    cursor: pointer !important;
}

/* Also work if parent has the id */
[id="grow"] > *,
#grow > * {
    transition: transform 0.3s ease !important;
}

[id="grow"]:hover > *,
#grow:hover > * {
    transform: scale(1.05) !important;
}
