/* 
   Premium Responsive Digital Business Card Styles
   Fluid Typography, Safe Area Insets, CSS Grid, App-like feel.
*/

:root {
    --card-max-width: 800px;
    --card-bg: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    --action-bar-height: 70px;

    /* Fluid Typography (min, preferred, max) */
    --text-h1: clamp(1.8rem, 4vw, 2.5rem);
    --text-h2: clamp(1.4rem, 3vw, 1.8rem);
    --text-h3: clamp(1.1rem, 2.5vw, 1.4rem);
    --text-body: clamp(0.9rem, 1.5vw, 1.05rem);
    --text-small: clamp(0.75rem, 1.2vw, 0.85rem);
}

/* Base Body Styles */
.card-body {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    font-family: var(--font-body, 'Inter', sans-serif);
    display: flex;
    justify-content: center;
    color: var(--color-text-main, #1e293b);
    overflow-x: hidden;
    padding-bottom: calc(var(--action-bar-height) + env(safe-area-inset-bottom, 20px) + 20px);
}

.card-container {
    width: 100%;
    max-width: var(--card-max-width);
    background: var(--card-bg);
    min-height: 100vh;
    min-height: 100dvh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Typography Overrides */
.card-container h2 {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: var(--text-h2);
    color: var(--color-primary, #019340);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    text-align: center;
    font-weight: 600;
}

.card-container h3 {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: var(--text-h3);
    color: var(--color-text-main, #1e293b);
    margin-bottom: 0.5rem;
}

p,
span,
div {
    font-size: var(--text-body);
}

/* Accessibility Focus States */
:focus-visible {
    outline: 3px solid var(--color-primary, #019340);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .animate-on-scroll,
    .animate-slide-up {
        opacity: 1;
        transform: none;
    }
}

/* Hero Section */
.card-hero {
    position: relative;
    padding: clamp(2rem, 5vw, 4rem) 2rem clamp(1.5rem, 4vw, 3rem);
    text-align: center;
    background: linear-gradient(180deg, var(--color-primary, #019340) 0%, var(--color-primary-light, #017a35) 100%);
    color: white;
    border-bottom-left-radius: clamp(30px, 5vw, 50px);
    border-bottom-right-radius: clamp(30px, 5vw, 50px);
    box-shadow: var(--shadow-md);
}

.hero-bg-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M10 10c10-5 20-5 30 0s20 5 30 0" stroke="rgba(255,255,255,0.05)" fill="none" stroke-width="2"/></svg>');
    background-size: 50px 50px;
    opacity: 0.5;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.logo-container {
    width: clamp(80px, 15vw, 120px);
    height: clamp(80px, 15vw, 120px);
    margin: 0 auto clamp(1rem, 2vw, 1.5rem);
    background: white;
    border-radius: 50%;
    padding: clamp(10px, 2vw, 20px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.company-title {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: var(--text-h1);
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: var(--text-h3);
    font-weight: 500;
    color: var(--color-highlight, #A8CF6A);
    margin-bottom: 1rem;
}

.sub-tagline {
    font-size: var(--text-body);
    opacity: 0.9;
    line-height: 1.5;
    color: #e2e8f0;
    max-width: 600px;
    margin: 0 auto;
}

/* Sections */
.card-section {
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.2rem, 3vw, 2.5rem);
}

/* Action Buttons Grid */
.card-actions {
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.2rem, 3vw, 2.5rem);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.8rem, 2vw, 1.5rem);
    margin-top: calc(-1 * clamp(1.5rem, 3vw, 2.5rem));
    position: relative;
    z-index: 10;
}

.action-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: clamp(1rem, 2vw, 1.5rem);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-text-main);
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    min-height: 44px;
    /* Touch target accessibility */
    min-width: 44px;
}

.action-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(1, 147, 64, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease-out, height 0.4s ease-out;
}

.action-btn:hover::after,
.action-btn:active::after {
    width: 300px;
    height: 300px;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}

.btn-icon {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.btn-text {
    font-size: var(--text-small);
    font-weight: 500;
    text-align: center;
    position: relative;
    z-index: 2;
}

.action-btn.outline-action {
    grid-column: 1 / -1;
    background: transparent;
    border: 2px dashed var(--color-primary);
    flex-direction: row;
    padding: clamp(1rem, 2vw, 1.2rem);
}

.action-btn.outline-action .btn-icon {
    margin-bottom: 0;
    margin-right: 10px;
}

/* Overview Card */
.overview-grid {
    background: white;
    border-radius: 20px;
    padding: clamp(1.2rem, 3vw, 2rem);
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.overview-item {
    display: flex;
    flex-direction: column;
}

.overview-label {
    font-size: var(--text-small);
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.overview-value {
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--color-text-main);
}

/* Products Cards */
.product-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1rem, 2vw, 1.5rem);
}

.product-card {
    background: white;
    padding: clamp(1.2rem, 3vw, 2rem) 1rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-highlight);
}

.product-icon {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
}

.brand-list {
    font-size: var(--text-small);
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-top: 0.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1rem, 2vw, 1.5rem);
}

.stat-card {
    background: white;
    padding: clamp(1.2rem, 3vw, 2rem) 1rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.stat-icon {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.stat-text {
    font-size: var(--text-small);
    font-weight: 500;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.5rem, 1vw, 1rem);
    border-radius: 20px;
    overflow: hidden;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: #e2e8f0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Map Card */
.map-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    background: white;
    border: 4px solid white;
    height: clamp(200px, 40vw, 350px);
}

.map-card iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Social Link Footer */
.card-socials {
    display: flex;
    justify-content: center;
    gap: clamp(0.8rem, 2vw, 1.5rem);
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
}

.social-btn {
    width: clamp(45px, 10vw, 55px);
    height: clamp(45px, 10vw, 55px);
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--color-bg-light);
}

/* Card Nav */
.card-nav {
    background: var(--color-primary);
    margin: clamp(1.5rem, 4vw, 3rem) clamp(1.2rem, 3vw, 2.5rem) 1rem;
    border-radius: 20px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    text-align: center;
    color: white;
}

.card-nav h3 {
    color: white;
    margin-bottom: 1.5rem;
}

.nav-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.nav-links-grid a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: var(--text-body);
    font-weight: 500;
    transition: background 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links-grid a:hover,
.nav-links-grid a:focus-visible {
    background: rgba(255, 255, 255, 0.2);
}

/* Footer */
.card-footer {
    text-align: center;
    padding: 1rem 1.5rem clamp(2rem, 5vw, 4rem);
    font-size: var(--text-small);
    color: var(--color-text-muted);
}

/* Sticky Bottom Action Bar */
.sticky-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: var(--card-max-width);
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 5px 0.5rem;
    padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));
}

.sticky-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    /* Specific fixed size for bottom bar */
    flex: 1;
    min-height: 60px;
    /* Comfortable touch target */
    transition: color 0.3s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 5px;
}

.sticky-btn .icon {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.sticky-btn:hover,
.sticky-btn:focus-visible {
    color: var(--color-primary);
    outline: none;
}

.sticky-btn.highlight {
    color: var(--color-primary);
    transform: translateY(-15px);
    background: white;
    border-radius: 50%;
    width: clamp(60px, 15vw, 75px);
    height: clamp(60px, 15vw, 75px);
    box-shadow: 0 5px 15px rgba(1, 147, 64, 0.2);
    flex: 0 0 auto;
    margin: 0 10px;
    padding: 0;
    border: 2px solid white;
}

.sticky-btn.highlight .icon {
    font-size: 1.8rem;
    margin-bottom: 0;
}

/* Tablet & Desktop Layouts (>600px) */
@media (min-width: 600px) {
    .card-actions {
        grid-template-columns: repeat(3, 1fr);
    }

    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .overview-item.full-width {
        grid-column: 1 / -1;
    }
}

/* Desktop Larger Screens (>800px) */
@media (min-width: 800px) {
    .card-container {
        border-radius: 30px;
        margin: clamp(2rem, 5vh, 4rem) auto;
        min-height: auto;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .card-body {
        /* Reduce padding as sticky bar moves to floating dock */
        padding-bottom: clamp(2rem, 5vh, 4rem);
    }

    .card-actions {
        grid-template-columns: repeat(4, 1fr);
    }

    .product-cards,
    .stats-grid,
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .sticky-action-bar {
        border-radius: 40px;
        bottom: 20px;
        width: 90%;
        max-width: 500px;
        padding: 5px 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

    .sticky-btn.highlight {
        transform: translateY(-20px);
        box-shadow: 0 8px 25px rgba(1, 147, 64, 0.25);
    }
}

/* Ensure images in grid don't exceed boundaries */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Modal Overlay & Containers */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: #ffffff;
    width: 90%;
    max-width: 450px;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    border: 1px solid rgba(1, 147, 64, 0.1);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.modal-header h3 {
    margin: 0;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 1.25rem;
    color: var(--color-primary, #019340);
    font-weight: 600;
}

.modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-info-text {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.contact-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    gap: 1rem;
}

.contact-option:hover {
    border-color: rgba(1, 147, 64, 0.2);
    background: #f4fbf7;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.contact-number {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-number:hover {
    color: var(--color-primary, #019340);
}

.contact-actions {
    display: flex;
    gap: 0.5rem;
}

.contact-action-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
    border: none;
    font-family: var(--font-body, 'Inter', sans-serif);
}

.contact-action-btn.dial-btn {
    background-color: var(--color-primary, #019340);
    color: #ffffff;
}

.contact-action-btn.dial-btn:hover {
    background-color: var(--color-primary-dark, #006b2e);
}

.contact-action-btn.copy-btn {
    background-color: #e2e8f0;
    color: #334155;
}

.contact-action-btn.copy-btn:hover {
    background-color: #cbd5e1;
    color: #0f172a;
}

.contact-action-btn.wa-btn {
    background-color: #25D366;
    color: #ffffff;
    font-weight: 600;
}

.contact-action-btn.wa-btn:hover {
    background-color: #1ebe57;
}

/* Mobile Bottom Sheet specific logic */
@media (max-width: 600px) {
    .modal-overlay {
        align-items: flex-end;
    }
    
    .modal-container {
        width: 100%;
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
    }
    
    .modal-overlay.active .modal-container {
        transform: translateY(0);
    }
}