/* ===================================
   Illustrated Hand-Drawn Style Additions
   =================================== */

/* Hand-Drawn Border Effect */
.hand-drawn-border {
    border: 3px solid;
    border-image-source: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cpath d='M0,50 Q25,45 50,50 T100,50' stroke='%234A4A4A' stroke-width='3' fill='none'/%3E%3C/svg%3E");
    border-image-slice: 1;
    border-image-repeat: round;
}

/* Wavy Section Dividers */
.wavy-divider {
    position: relative;
    overflow: hidden;
}

.wavy-divider::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 20' preserveAspectRatio='none'%3E%3Cpath d='M0,10 Q300,0 600,10 T1200,10 L1200,20 L0,20 Z' fill='white'/%3E%3C/svg%3E");
    background-size: cover;
}

/* Cartoon Cloud Decorations */
.cloud-decoration {
    position: absolute;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: float-cloud 20s ease-in-out infinite;
    opacity: 0.9;
}

.cloud-decoration::before,
.cloud-decoration::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.cloud-decoration.small {
    width: 60px;
    height: 30px;
}

.cloud-decoration.small::before {
    width: 40px;
    height: 40px;
    top: -15px;
    left: 10px;
}

.cloud-decoration.small::after {
    width: 30px;
    height: 30px;
    top: -10px;
    right: 5px;
}

@keyframes float-cloud {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(30px) translateY(-10px);
    }
}

/* Illustrated Card Styles */
.illustrated-card {
    background: white;
    border-radius: 25px;
    border: 4px solid var(--cartoon-dark);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.illustrated-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 25px;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.5) 50%, 
        transparent 70%);
    pointer-events: none;
}

/* Cartoon Speech Bubble */
.speech-bubble {
    background: white;
    border: 3px solid var(--cartoon-dark);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.08);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid white;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 27px;
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 18px solid var(--cartoon-dark);
}

/* Dotted Trail Lines (like car paths) */
.dotted-trail {
    position: relative;
}

.dotted-trail::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        to right,
        var(--primary-yellow) 0,
        var(--primary-yellow) 20px,
        transparent 20px,
        transparent 40px
    );
    border-radius: 2px;
}

/* Illustrated Button Enhancements */
.btn-illustrated {
    border: 3px solid var(--cartoon-dark);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    font-weight: 700;
    text-transform: none;
}

.btn-illustrated:hover {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
}

.btn-illustrated:active {
    transform: translate(5px, 5px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
}

/* Cartoon Stamp Effect */
.stamp-badge {
    background: var(--warm-red);
    color: white;
    border: 3px dashed white;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    text-align: center;
    transform: rotate(-15deg);
    box-shadow: var(--shadow-md);
    line-height: 1.2;
}

/* Polaroid Photo Frame */
.polaroid-frame {
    background: white;
    border: 2px solid var(--cartoon-dark);
    padding: 15px 15px 50px 15px;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.polaroid-frame:hover {
    transform: rotate(0deg) scale(1.05);
}

/* Sticky Note Style */
.sticky-note {
    background: var(--primary-yellow);
    border: 2px solid var(--primary-orange);
    padding: 1.5rem;
    font-family: var(--font-handwritten);
    font-size: 1.1rem;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.15);
    transform: rotate(1deg);
    position: relative;
}

.sticky-note::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-top: 20px solid rgba(0, 0, 0, 0.05);
    border-right: 20px solid rgba(0, 0, 0, 0.05);
}

/* Illustrated Icon Containers */
.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--cartoon-dark);
    background: white;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

/* Cartoon Star Burst */
.star-burst {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--primary-yellow);
    clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%, 68% 57%,
        79% 91%, 50% 70%, 21% 91%, 32% 57%,
        2% 35%, 39% 35%
    );
    animation: spin 10s linear infinite;
}

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

/* Hand-drawn underline effect */
.hand-underline {
    position: relative;
    display: inline-block;
}

.hand-underline::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10'%3E%3Cpath d='M0,5 Q50,2 100,5 T200,5' stroke='%23FF9966' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 200px 10px;
}

/* Cartoon Shadow Text */
.cartoon-text-shadow {
    text-shadow: 
        3px 3px 0 rgba(0, 0, 0, 0.1),
        -1px -1px 0 rgba(255, 255, 255, 0.8);
}

/* Wobble Animation for fun elements */
@keyframes wobble {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.wobble-animation {
    animation: wobble 3s ease-in-out infinite;
}

/* Bouncy hover effect */
.bouncy-hover {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bouncy-hover:hover {
    transform: scale(1.1);
}

/* Cartoon Border Radius Variations */
.blob-shape {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.organic-shape {
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
}

/* Sketch-style dashed borders */
.sketch-border {
    border: 3px dashed var(--cartoon-dark);
    border-radius: 20px;
    background: white;
    position: relative;
}

.sketch-border::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px dashed var(--primary-orange);
    border-radius: 20px;
    opacity: 0.5;
    transform: rotate(1deg);
}