/* ============================================
   Rolla Drug Inc. — Custom Styles
   ============================================ */

/* Base reset & smooth scrolling */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Geometric Background Shapes
   ============================================ */
.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.4;
}

.geo-circle-1 {
    width: 400px;
    height: 400px;
    border: 2px solid rgba(20, 184, 166, 0.15);
    border-radius: 50%;
    top: 15%;
    left: -100px;
    animation: float 20s ease-in-out infinite;
}

.geo-circle-2 {
    width: 200px;
    height: 200px;
    background: rgba(20, 184, 166, 0.06);
    border-radius: 50%;
    bottom: 20%;
    right: 5%;
    animation: float 15s ease-in-out infinite reverse;
}

.geo-square-1 {
    width: 80px;
    height: 80px;
    border: 2px solid rgba(20, 184, 166, 0.12);
    top: 40%;
    right: 15%;
    transform: rotate(45deg);
    animation: spin-slow 30s linear infinite;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid rgba(20, 184, 166, 0.08);
    top: 60%;
    left: 8%;
    animation: float 18s ease-in-out infinite;
}

.geo-dots {
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, rgba(20, 184, 166, 0.2) 2px, transparent 2px);
    background-size: 16px 16px;
    top: 30%;
    right: 25%;
}

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

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-link {
    position: relative;
}

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

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

/* ============================================
   Hero Section
   ============================================ */
.hero-badge {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

#hero h1 {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.4s;
}

#hero p {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

#hero .flex.flex-col {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #14b8a6, #0d9488);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ============================================
   Why Us Cards
   ============================================ */
.why-card {
    border: 1px solid transparent;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.why-card:hover {
    border-color: rgba(20, 184, 166, 0.2);
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-nav-link {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

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

/* ============================================
   Form Styles
   ============================================ */
input:focus,
textarea:focus {
    outline: none;
}

/* ============================================
   Responsive tweaks
   ============================================ */
@media (max-width: 768px) {
    .geo-circle-1 {
        width: 200px;
        height: 200px;
    }

    .geo-circle-2 {
        width: 100px;
        height: 100px;
    }

    .geo-square-1 {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   Focus visible for accessibility
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    .geo-shape,
    .scroll-indicator,
    #navbar {
        display: none;
    }

    body {
        color: #0f172a;
        background: white;
    }
}
