/**
 * DC Apple Shop - Custom Styles
 * Daily Coins Ltd Company
 * Brand Colors: Yellow (#FFD700) and Sea Blue (#00A3E0)
 */

/* Custom Brand Colors */
:root {
    --brand-yellow: #FFD700;
    --brand-sea-blue: #00A3E0;
    --brand-yellow-dark: #E6C200;
    --brand-sea-blue-dark: #0088B8;
    --brand-gradient: linear-gradient(135deg, var(--brand-yellow), var(--brand-sea-blue));
}

/* Custom Utility Classes */
.bg-brand-gradient {
    background: var(--brand-gradient);
}

.text-brand-yellow {
    color: var(--brand-yellow);
}

.text-brand-sea-blue {
    color: var(--brand-sea-blue);
}

.bg-brand-yellow {
    background-color: var(--brand-yellow);
}

.bg-brand-sea-blue {
    background-color: var(--brand-sea-blue);
}

.border-brand-yellow {
    border-color: var(--brand-yellow);
}

.border-brand-sea-blue {
    border-color: var(--brand-sea-blue);
}

/* Hover Effects */
.hover-brand-yellow:hover {
    background-color: var(--brand-yellow-dark);
}

.hover-brand-sea-blue:hover {
    background-color: var(--brand-sea-blue-dark);
}

/* Custom Components */
.apple-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.apple-card:hover {
    transform: scale(1.05);
}

.apple-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    transform: scale(1);
}

.apple-button:hover {
    transform: scale(1.05);
}

.apple-button-primary {
    background-color: var(--brand-sea-blue);
    color: white;
}

.apple-button-primary:hover {
    background-color: var(--brand-sea-blue-dark);
}

.apple-button-secondary {
    background-color: var(--brand-yellow);
    color: #1f2937;
}

.apple-button-secondary:hover {
    background-color: var(--brand-yellow-dark);
}

/* Navigation Styles */
.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Navigation States - Cleaned up */
.nav-mobile-menu {
    background: var(--brand-sea-blue-dark) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Service Cards */
.service-card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-0.5rem);
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background-color: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 50%;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    z-index: 50;
}

.whatsapp-button:hover {
    background-color: #059669;
}

/* Loading Animation */
.loading-spinner {
    animation: spin 1s linear infinite;
    border-radius: 50%;
    height: 2rem;
    width: 2rem;
    border: 2px solid transparent;
    border-bottom-color: var(--brand-sea-blue);
}

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

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

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

::-webkit-scrollbar-thumb {
    background: var(--brand-sea-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-sea-blue-dark);
}

/* Responsive Typography */
@media (max-width: 640px) {
    .text-responsive-xl {
        font-size: 1.5rem;
    }
    
    .text-responsive-2xl {
        font-size: 1.875rem;
    }
}

/* Navigation Styles - Cleaned up */

/* Compact Sticky Navigation */
.nav-responsive {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    background: var(--brand-sea-blue-dark) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .nav-responsive {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* Hero Section Enhancements */
.hero-overlay {
    background: rgba(0, 0, 0, 0.9) !important;
}

.hero-overlay-dark {
    background: rgba(0, 0, 0, 0.6) !important;
}

.hero-overlay-strong {
    background: rgba(0, 0, 0, 0.8) !important;
}

.hero-text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-text-shadow-lg {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
}

.hero-text-shadow-xl {
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 1);
}

/* Medium Hero Section for non-homepage pages */
.hero-small {
    height: 50vh !important;
    margin-top: 0 !important;
    transition: all 0.3s ease-in-out;
}

@media (min-width: 768px) {
    .hero-small {
        height: 60vh !important;
        margin-top: 0 !important;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

/* Typewriter Effect */
.typewriter-container {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typewriter-text {
    display: inline-block;
    border-right: 2px solid;
    white-space: nowrap;
    overflow: hidden;
    animation: blink-caret 0.75s step-end infinite;
    transition: color 0.3s ease;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: currentColor; }
}

/* Typewriter text - all white */
.typewriter-text {
    color: white !important;
}

/* Navigation Active States */
.nav-active {
    background-color: rgba(255, 193, 7, 0.2) !important;
    color: #FFC107 !important;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

.nav-active-mobile {
    background-color: rgba(255, 193, 7, 0.2) !important;
    color: #FFC107 !important;
    font-weight: 600;
}

/* Mobile Navigation Improvements */
.nav-mobile-menu {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-link-mobile {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-link-mobile:hover {
    border-left-color: #FFC107;
    transform: translateX(4px);
}

.nav-link-mobile.nav-active-mobile {
    border-left-color: #FFC107;
    background-color: rgba(255, 193, 7, 0.15) !important;
}

/* Mobile Menu Button Animation */
#mobile-menu-button {
    transition: transform 0.3s ease;
}

#mobile-menu-button:hover {
    transform: scale(1.1);
}

/* Ensure mobile menu is properly positioned */
@media (max-width: 768px) {
    .nav-mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 50;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        display: block !important; /* Force display when not hidden */
    }
    
    .nav-mobile-menu.hidden {
        display: none !important;
    }
}

/* Debug styles for mobile navigation */
#mobile-menu-button {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#mobile-menu-button:active {
    transform: scale(0.95);
}

/* Custom mobile menu visibility classes */
.mobile-menu-hidden {
    display: none !important;
}

.mobile-menu-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure mobile menu is visible when not hidden */
#mobile-menu:not(.mobile-menu-hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Services Section Mobile Centering */
.services-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    max-width: 75rem;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .services-container {
        flex-direction: row;
        gap: 2rem;
    }
}

/* Individual service cards mobile centering */
.service-card-homepage {
    width: 100%;
    max-width: 20rem;
    margin: 0 auto;
    text-align: center;
}

@media (min-width: 1024px) {
    .service-card-homepage {
        width: 20rem;
        max-width: none;
    }
}

/* Ensure service cards are centered on mobile */
@media (max-width: 1023px) {
    .service-card-homepage {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .service-card-homepage ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        max-width: 18rem;
    }
}

/* Desktop-only classes */
.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .desktop-only {
        display: block;
    }
}

/* Homepage Hero Section */
.hero-homepage {
    margin-top: 0 !important;
}

@media (min-width: 768px) {
    .hero-homepage {
        margin-top: 0 !important;
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

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