/* General Styles */
body {
    padding-top: 56px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Hero Carousel - Fixed Heights */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 680px;
    max-height: 680px;
    overflow: hidden;
}

.carousel {
    min-height: 680px;
    max-height: 680px;
}

.carousel-inner {
    min-height: 680px;
    max-height: 680px;
}

.carousel-item {
    min-height: 680px;
    max-height: 680px;
    height: 680px;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.carousel-content {
    padding: 80px 0;
    min-height: 680px;
    max-height: 680px;
    height: 680px;
    display: flex;
    align-items: center;
}

.carousel-content .container {
    width: 100%;
}

.carousel-content .row {
    min-height: 520px;
    max-height: 520px;
    height: 520px;
    align-items: center;
}

/* Smooth slide animation */
.carousel-item-start,
.carousel-item-end {
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.carousel-item-next:not(.carousel-item-start),
.carousel-item-prev:not(.carousel-item-end) {
    transform: translateX(0);
}

.carousel-item-next.carousel-item-start {
    transform: translateX(100%);
}

.carousel-item-prev.carousel-item-end {
    transform: translateX(-100%);
}

.carousel-item.active:not(.carousel-item-start):not(.carousel-item-end) {
    transform: translateX(0);
}

/* Content animations - synchronized slide + fade */
.carousel h1,
.carousel .lead,
.carousel .btn {
    opacity: 0;
    transform: translateY(30px);
}

.carousel .iphone-mockup,
.carousel .ipad-mockup {
    opacity: 0;
    transform: translateY(30px);
}

.carousel .app-store-badge {
    opacity: 0;
    transform: translateY(20px);
}

/* Unified slide-in animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Staggered animations for active slide */
.carousel-item.active h1 {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) 0.1s forwards;
}

.carousel-item.active .lead {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) 0.2s forwards;
}

.carousel-item.active .app-store-badge {
    animation: slideInUpSmall 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) 0.3s forwards;
}

.carousel-item.active .btn {
    animation: slideInUpSmall 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) 0.3s forwards;
}

.carousel-item.active .iphone-mockup,
.carousel-item.active .ipad-mockup {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) 0.2s forwards;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Device mockup column - fixed height */
.carousel-item .col-md-6:last-child {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 520px;
}

/* iPhone 16 Mockup with Real Bezel */
.iphone-mockup {
    width: 280px;
    height: 605px;
    margin: 0 auto;
    position: relative;
}

.iphone-mockup-large {
    width: 350px;
    height: 756px;
    margin: 0 auto;
    position: relative;
}

.iphone-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.iphone-bezel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.iphone-bezel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.iphone-screen {
    position: absolute;
    top: 5%;
    left: 3.2%;
    right: 3.2%;
    bottom: 5%;
    background: #000;
    border-radius: 48px;
    overflow: hidden;
    z-index: 1;
}


.app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* iPad specific - ensure landscape fit */
.ipad-screen .app-screenshot {
    object-fit: contain;
    object-position: center;
}

/* App Store Badge */
.app-store-badge {
    display: inline-block;
    transition: transform 0.2s ease;
}

.app-store-badge:hover {
    transform: scale(1.05) translateY(0) !important;
}

.app-store-badge img {
    height: 50px;
    width: auto;
}

/* iPad Mini Mockup - Landscape Orientation */
.ipad-mockup {
    width: 867px;
    height: 605px;
    margin: 0 auto;
    position: relative;
}

.ipad-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.ipad-bezel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.ipad-bezel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ipad-screen {
    position: absolute;
    top: 16%;
    left: 5%;
    right: 5%;
    bottom: 16%;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    z-index: 1;
}

/* Featured App Section */
.featured-app-icon {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
}

/* About Section */
.principle-icon {
    font-size: 3rem;
}

/* Mailing List Section */
#mailingListForm .form-control {
    border-radius: 50px;
}

#mailingListForm .btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
}

#formMessage {
    font-size: 1.1rem;
}

#formMessage.success {
    color: #28a745;
}

#formMessage.error {
    color: #dc3545;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section,
    .carousel,
    .carousel-inner,
    .carousel-item,
    .carousel-content {
        min-height: 600px;
        max-height: 600px;
        height: 600px;
    }
    
    .carousel-content {
        padding: 60px 0;
    }
    
    .carousel-content .row {
        min-height: 440px;
        max-height: 440px;
        height: 440px;
    }
    
    .carousel-item .col-md-6 {
        min-height: auto;
    }
    
    .carousel-item .col-md-6:last-child {
        height: 440px;
    }
    
    .iphone-mockup {
        width: 220px;
        height: 475px;
        margin-top: 30px;
    }
    
    .iphone-mockup-large {
        width: 280px;
        height: 605px;
    }
    
    .iphone-screen {
        border-radius: 40px;
    }
    
    .ipad-mockup {
        width: 680px;
        height: 475px;
        margin-top: 30px;
    }
    
.ipad-screen {
    position: absolute;
    top: 16%;
    left: 5%;
    right: 5%;
    bottom: 16%;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    z-index: 1;
}

@media (max-width: 576px) {
    .hero-section,
    .carousel,
    .carousel-inner,
    .carousel-item,
    .carousel-content {
        min-height: 550px;
        max-height: 550px;
        height: 550px;
    }
    
    .carousel-content .row {
        min-height: 390px;
        max-height: 390px;
        height: 390px;
    }
    
    .carousel-item .col-md-6:last-child {
        height: 390px;
    }
    
    .iphone-mockup {
        width: 200px;
        height: 432px;
    }
    
    .iphone-mockup-large {
        width: 250px;
        height: 540px;
    }
    
    .iphone-screen {
        border-radius: 35px;
    }
    
    .ipad-mockup {
        width: 619px;
        height: 432px;
    }
    
.ipad-screen {
    position: absolute;
    top: 16%;
    left: 5%;
    right: 5%;
    bottom: 16%;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    z-index: 1;
}

/* App Overview Strip */
.app-icon-strip {
    width: 100px;
    height: 100px;
    border-radius: 18px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card a.text-decoration-none {
    color: inherit;
}

.card a.text-decoration-none:hover .card-title {
    color: #0d6efd;
}

.app-icon-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 22px !important;
    overflow: hidden !important;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-icon-wrapper .app-icon-strip {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

/* Scroll to Top Button */
#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scrollToTop.show {
    opacity: 0.7;
    visibility: visible;
}

#scrollToTop:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#scrollToTop:active {
    transform: translateY(-1px);
}


/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    #scrollToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

/* ========================================
   BUTTON VISIBILITY AND ANIMATION FIX
   ======================================== */

/* Initial state for buttons - hidden and positioned for slide-in */
.carousel .btn {
    opacity: 0 !important;
    transform: translateY(30px) !important;
}

/* Active slide buttons - animate in with slideInUp matching other text */
.carousel-item.active .btn {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) 0.3s forwards !important;
}

/* ========================================
   CAROUSEL BUTTONS - CLEAN IMPLEMENTATION
   ======================================== */

/* Button container - animates as a unit */
.carousel .carousel-buttons {
    opacity: 0;
    transform: translateY(30px);
}

.carousel-item.active .carousel-buttons {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) 0.3s forwards;
}

/* Force buttons to always be visible (override for testing) */
.carousel-buttons,
.carousel-item .carousel-buttons,
.carousel-item.active .carousel-buttons {
    opacity: 1 !important;
    transform: none !important;
}

/* ========================================
   CAROUSEL BUTTONS - NO ANIMATION VERSION
   ======================================== */

/* Completely disable all animations and transforms on carousel buttons */
.carousel .carousel-buttons,
.carousel .carousel-buttons *,
.carousel-item .carousel-buttons,
.carousel-item .carousel-buttons *,
.carousel-item.active .carousel-buttons,
.carousel-item.active .carousel-buttons * {
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

/* Remove any initial hidden states */
.carousel .btn,
.carousel-item .btn,
.carousel-item.active .btn {
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    transform: none !important;
}

/* ========================================
   FIX: Prevent button movement during carousel transitions
   ======================================== */

/* Ensure buttons don't move during any carousel transition state */
.carousel-item .carousel-buttons,
.carousel-item-next .carousel-buttons,
.carousel-item-prev .carousel-buttons,
.carousel-item-start .carousel-buttons,
.carousel-item-end .carousel-buttons,
.carousel-item.active .carousel-buttons {
    transform: none !important;
    animation: none !important;
    opacity: 1 !important;
    position: relative !important;
}

/* Explicitly set for all button elements */
.carousel-item .btn,
.carousel-item-next .btn,
.carousel-item-prev .btn,
.carousel-item-start .btn,
.carousel-item-end .btn {
    transform: none !important;
    animation: none !important;
    opacity: 1 !important;
}
