/* Hand-drawn style enhancements */

/* Hand-drawn border effects */
.hand-drawn-border {
    position: relative;
}

.hand-drawn-border:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: inherit;
    filter: url(#rough-border);
    opacity: 0.8;
}

/* Hand-drawn button effects */
.btn-primary {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: 2px solid transparent;
    transform-style: preserve-3d;
}

.btn-primary:before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: transparent;
    border: 2px solid var(--accent-color);
    border-radius: inherit;
    opacity: 0.6;
    transform: translateZ(-1px);
    filter: url(#hand-drawn-stroke);
}

.btn-primary:hover {
    animation: hand-drawn-wiggle 0.3s ease-in-out;
}

@keyframes hand-drawn-wiggle {
    0%, 100% { transform: translateY(-2px) rotate(0deg); }
    25% { transform: translateY(-2px) rotate(0.5deg); }
    75% { transform: translateY(-2px) rotate(-0.5deg); }
}

/* Hand-drawn section decorations */
.section-decoration {
    position: relative;
    background: none;
    height: 8px;
    overflow: visible;
}

.section-decoration:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    filter: url(#hand-drawn-line);
}

.section-decoration:after {
    content: '';
    position: absolute;
    top: 2px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--accent-color);
    opacity: 0.7;
    filter: url(#sketchy-line);
}

/* Hand-drawn card effects */
.service-card,
.destination-card,
.testimonial-card,
.article-card,
.value-card,
.team-member,
.achievement-card {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.service-card:before,
.destination-card:before,
.testimonial-card:before,
.article-card:before,
.value-card:before,
.team-member:before,
.achievement-card:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: inherit;
    opacity: 0.1;
    filter: url(#rough-paper);
    z-index: -1;
}

.service-card:hover:before,
.destination-card:hover:before,
.testimonial-card:hover:before,
.article-card:hover:before,
.value-card:hover:before,
.team-member:hover:before,
.achievement-card:hover:before {
    opacity: 0.2;
    animation: hand-drawn-glow 0.3s ease-in-out;
}

@keyframes hand-drawn-glow {
    0%, 100% { filter: url(#rough-paper) drop-shadow(0 0 5px rgba(255, 107, 53, 0.3)); }
    50% { filter: url(#rough-paper) drop-shadow(0 0 15px rgba(255, 107, 53, 0.5)); }
}

/* Hand-drawn text effects */
.hero-title,
.thank-you-title,
.article-title {
    position: relative;
    text-shadow: 
        1px 1px 0 rgba(255, 107, 53, 0.1),
        2px 2px 0 rgba(255, 107, 53, 0.1),
        3px 3px 0 rgba(255, 107, 53, 0.05);
}

.hero-title:after,
.thank-you-title:after,
.article-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    filter: url(#hand-drawn-underline);
    opacity: 0.6;
}

/* Hand-drawn navigation */
.nav-link {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover:before,
.nav-link.active:before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    filter: url(#sketchy-line);
    animation: hand-drawn-draw 0.3s ease-out;
}

@keyframes hand-drawn-draw {
    0% { width: 0; left: 50%; }
    100% { width: 100%; left: 0; }
}

/* Hand-drawn form elements */
.form-group input,
.newsletter-form input {
    position: relative;
    border: 2px solid #E0E0E0;
    background: var(--white);
    transition: all 0.3s ease;
}

.form-group input:focus,
.newsletter-form input:focus {
    border-color: var(--primary-color);
    filter: url(#hand-drawn-input);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Hand-drawn quote styling */
.founder-quote,
.testimonial-card {
    position: relative;
    background: var(--background-light);
    border-left: 4px solid var(--primary-color);
}

.founder-quote:before,
.testimonial-card:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -6px;
    bottom: -2px;
    width: 8px;
    background: var(--primary-color);
    filter: url(#rough-border);
    opacity: 0.8;
}

/* Hand-drawn highlight boxes */
.article-tip,
.article-highlight {
    position: relative;
    background: var(--background-light);
    border: 2px dashed var(--primary-color);
    border-radius: 15px;
}

.article-tip:before,
.article-highlight:before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: transparent;
    border: 1px solid var(--primary-color);
    border-radius: inherit;
    filter: url(#sketchy-border);
    opacity: 0.5;
}

/* Hand-drawn social icons */
.social-link,
.social-link-large,
.footer-social a {
    position: relative;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social-link:hover,
.social-link-large:hover,
.footer-social a:hover {
    transform: translateY(-3px) rotate(2deg);
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2));
}

/* Hand-drawn stats and numbers */
.stat-number,
.reason-number {
    position: relative;
    font-family: 'Georgia', serif;
    font-weight: bold;
}

.stat-number:after,
.reason-number:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -5px;
    right: -5px;
    height: 2px;
    background: var(--primary-color);
    filter: url(#hand-drawn-circle);
    opacity: 0.6;
    border-radius: 50%;
}

/* Hand-drawn logo effect */
.logo,
.footer-logo {
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.logo:hover,
.footer-logo:hover {
    animation: hand-drawn-bounce 0.6s ease-in-out;
}

@keyframes hand-drawn-bounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(1deg); }
    75% { transform: scale(1.05) rotate(-1deg); }
}

/* Hand-drawn page transitions */
.page-transition {
    position: relative;
    overflow: hidden;
}

.page-transition:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent 20%, var(--background-light) 80%);
    filter: url(#paper-texture);
    opacity: 0.05;
    animation: hand-drawn-rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes hand-drawn-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hand-drawn breadcrumbs */
.breadcrumb {
    position: relative;
    font-family: 'Georgia', serif;
}

.breadcrumb:before {
    content: '✏️';
    margin-right: 8px;
    opacity: 0.7;
}

.breadcrumb a {
    position: relative;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-color);
}

.breadcrumb a:hover {
    animation: hand-drawn-underline-wiggle 0.3s ease-in-out;
}

@keyframes hand-drawn-underline-wiggle {
    0%, 100% { border-bottom-style: dashed; }
    50% { border-bottom-style: dotted; }
}

/* Hand-drawn cookie banner */
.cookie-banner {
    position: relative;
    background: var(--white);
    border-top: 3px solid var(--primary-color);
}

.cookie-banner:before {
    content: '🍪';
    position: absolute;
    top: -15px;
    left: 20px;
    font-size: 2rem;
    background: var(--white);
    padding: 0 10px;
    animation: hand-drawn-cookie-bounce 2s ease-in-out infinite;
}

@keyframes hand-drawn-cookie-bounce {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(5deg) scale(1.1); }
    75% { transform: rotate(-5deg) scale(1.1); }
}

/* Hand-drawn toggle switches */
.toggle-switch .slider {
    background-color: #ccc;
    border: 2px solid #999;
    filter: url(#rough-toggle);
}

.toggle-switch input:checked + .slider {
    background-color: var(--primary-color);
    filter: url(#rough-toggle-active);
}

.toggle-switch .slider:before {
    background-color: white;
    border: 1px solid #ddd;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

/* Hand-drawn table and list styling */
.legal-section ul,
.service-card ul {
    position: relative;
}

.legal-section li:before,
.service-card li:before {
    color: var(--primary-color);
    font-weight: bold;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.1));
}

/* Hand-drawn image frames */
.hero-illustration,
.team-illustration,
.featured-img,
.article-img,
.destination-image,
.member-image {
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--primary-color), var(--secondary-color)) border-box;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.1));
    position: relative;
}

.hero-illustration:hover,
.team-illustration:hover,
.featured-img:hover,
.article-img:hover,
.destination-image:hover,
.member-image:hover {
    animation: hand-drawn-image-tilt 0.3s ease-in-out;
}

@keyframes hand-drawn-image-tilt {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(1deg); }
}

/* SVG Filters for hand-drawn effects */
.hand-drawn-filters {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Responsive hand-drawn adjustments */
@media (max-width: 768px) {
    .hand-drawn-border:before,
    .btn-primary:before,
    .service-card:before,
    .destination-card:before,
    .testimonial-card:before,
    .article-card:before {
        border-width: 1px;
    }
    
    .hero-title:after,
    .thank-you-title:after,
    .article-title:after {
        height: 2px;
    }
    
    .section-decoration:before {
        height: 3px;
    }
}

@media (max-width: 480px) {
    .hand-drawn-border:before,
    .btn-primary:before {
        display: none;
    }
    
    .hero-title,
    .thank-you-title,
    .article-title {
        text-shadow: none;
    }
    
    .social-link:hover,
    .social-link-large:hover {
        transform: translateY(-2px) rotate(1deg);
    }
}

/* Prefers-reduced-motion adjustments */
@media (prefers-reduced-motion: reduce) {
    .hand-drawn-wiggle,
    .hand-drawn-glow,
    .hand-drawn-draw,
    .hand-drawn-bounce,
    .hand-drawn-rotate,
    .hand-drawn-underline-wiggle,
    .hand-drawn-cookie-bounce,
    .hand-drawn-image-tilt {
        animation: none !important;
    }
    
    .social-link:hover,
    .social-link-large:hover,
    .footer-social a:hover {
        transform: none;
    }
}

/* Print adjustments */
@media print {
    .hand-drawn-border:before,
    .btn-primary:before,
    .service-card:before,
    .destination-card:before,
    .testimonial-card:before,
    .article-card:before,
    .section-decoration:before,
    .section-decoration:after,
    .hero-title:after,
    .thank-you-title:after,
    .article-title:after {
        display: none;
    }
    
    .hero-illustration,
    .team-illustration,
    .featured-img,
    .article-img,
    .destination-image,
    .member-image {
        border: 1px solid #ccc;
        filter: none;
    }
}
