/* Custom CSS for StartMart */

:root {
    --charcoal: #374151;
    --charcoal-light: #4B5563;
    --coral: #FF6B6B;
    --coral-dark: #E85555;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Loader */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: var(--charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    font-family: 'Playfair Display', serif;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--coral);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CTA Buttons */
.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--coral);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--coral);
}

.cta-primary:hover {
    background: var(--coral-dark);
    border-color: var(--coral-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* Service Cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Testimonial Cards */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--coral);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 40;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--coral-dark);
    transform: translateY(-4px);
}

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

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

@keyframes pulse-delayed {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

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

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
}

.animate-pulse-delayed {
    animation: pulse-delayed 2s ease-in-out infinite;
}

/* Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered Animation Delays */
.reveal-up:nth-child(1) { transition-delay: 0.1s; }
.reveal-up:nth-child(2) { transition-delay: 0.2s; }
.reveal-up:nth-child(3) { transition-delay: 0.3s; }
.reveal-up:nth-child(4) { transition-delay: 0.4s; }
.reveal-up:nth-child(5) { transition-delay: 0.5s; }
.reveal-up:nth-child(6) { transition-delay: 0.6s; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .loader-logo {
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .cta-primary,
    .cta-secondary {
        width: 100%;
        justify-content: center;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    section {
        padding: 4rem 1rem;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* Focus Styles for Accessibility */
input:focus,
textarea:focus,
select:focus,
button:focus,
a:focus {
    outline: 2px solid var(--coral);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .back-to-top,
    #loader,
    .animate-float,
    .animate-float-delayed {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    .bg-charcoal,
    .bg-gray-50 {
        background: #fff !important;
        color: #000 !important;
    }
}
