/* Custom styles and animations */
html {
    scroll-behavior: smooth;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #fffdf7;
}

::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Selection color */
::selection {
    background: #ffc347;
    color: #064e3b;
}

/* Geometric background patterns */
.geo-pattern {
    background-image: 
        linear-gradient(45deg, rgba(6, 78, 59, 0.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(6, 78, 59, 0.03) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(6, 78, 59, 0.03) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(6, 78, 59, 0.03) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Floating animation for decorative elements */
@keyframes float-slow {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

.float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

@keyframes float-medium {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(-5deg);
    }
}

.float-medium {
    animation: float-medium 6s ease-in-out infinite;
}

/* Pulse animation for emphasis */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 195, 71, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 195, 71, 0.6);
    }
}

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

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #065f46 0%, #10b981 50%, #ffc347 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(6, 78, 59, 0.2);
}

/* Button shine effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-shine:hover::before {
    left: 100%;
}

/* Number counter animation */
.counter {
    display: inline-block;
}

/* Responsive typography scaling */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}

@media (min-width: 769px) {
    .font-serif {
        font-size: clamp(2.5rem, 6vw, 5rem);
    }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 3px solid #ffc347;
    outline-offset: 2px;
}

/* Reduce 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;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    nav,
    .cta-button,
    button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .hero-gradient {
        background: #065f46 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Loading state for form buttons */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

/* Custom checkbox and radio styles */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #10b981;
}

/* Custom select styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23065f46' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: #064e3b;
    color: white;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 0.5rem);
}
