/* index_styles.css */
/* Version: 2.1 */
/* Landing page layout (newindex) and modal styles (auth_modal.php, site-wide) */
/* Encoding: UTF-8 */

/* =============================================
   Homepage Layout
   ============================================= */
   .homepage-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-logo {
    margin: 50px 40px;
}

/* =============================================
   Hero Section
   ============================================= */
.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 20px 0;
}

.hero-section {
    text-align: center;
    max-width: 600px;
}

.hero-section h1 {
    font-size: 2.8rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =============================================
   Slideshow
   ============================================= */
#slideshow {
    width: 350px;
    height: 300px;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
    border: 1px solid #c9c0da;
    flex-shrink: 0;
}

#slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

#slideshow img.active {
    opacity: 1;
}

/* =============================================
   Pricing Section
   ============================================= */
.pricing-section {
    margin: 0 auto;
    padding: 10px 20px;
    max-width: 1200px;
}

.pricing-section h2 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 20px auto;
}

.pricing-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid #e0e0e0;
}

.pricing-header {
    margin-bottom: 20px;
}

.pricing-header h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.price {
    font-size: 1rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.period {
    font-size: 0.9rem;
    color: #999;
}

.billing-options {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.billing-option {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f0f0f0;
    color: #666;
}

.billing-option.available {
    background: #e8f5e9;
    color: #2e7d32;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.features-list li {
    padding: 5px 0;
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.1;
}

.features-list i {
    color: #4caf50;
    min-width: 16px;
    font-size: 0.9rem;
}

/* =============================================
   Modal System
   ============================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-content h3 i {
    color: #667eea;
}

.modal-content>p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* =============================================
   Modal Form Overrides
   Scoped to .modal so they don't conflict with
   login_styles.css on standalone auth pages.
   ============================================= */
.modal .form-group {
    margin-bottom: 15px;
}

.modal .form-group label {
    color: #555;
    font-size: 13px;
}

.modal .input-icon i {
    left: 12px;
    font-size: 14px;
}

.modal .input-icon input {
    padding: 10px 12px 10px 35px;
    font-size: 14px;
}

.modal .form-group small {
    font-size: 11px;
    color: #999;
}

/* Login modal button */
#login-modal-button {
    display: block;
    margin: 20px auto;
}

/* Reserve space so status appearing doesn't jump layout */
#login-modal-status {
    min-height: 20px;
}

/* Signup PIN error message */
.signup-pin-error {
    color: #d32f2f;
    font-size: 13px;
    margin-bottom: 10px;
    display: none;
}

/* Verification code input — force uppercase display */
.uppercase-input {
    text-transform: uppercase;
}

/* =============================================
   Modal Status Messages
   Base colors and ::before icons come from
   login_styles.css (.status-loading / success / error).
   These rules add the layout for modal context only.
   ============================================= */
.modal .status-loading,
.modal .status-success,
.modal .status-error {
    padding: 10px 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 13px;
    display: flex;
    align-items: center;
}


/* =============================================
   Enhanced Mobile Responsive Styles
   ============================================= */

/* Force vertical stack on tablets and below */
@media (max-width: 900px) {
    .hero-wrapper {
        flex-direction: column !important;
        align-items: center !important;
    }

    #slideshow {
        width: 90%;
        max-width: 350px;
        margin: 20px auto 0;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 20px 15px;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions button {
        width: 100%;
        max-width: 280px;
    }

    #slideshow {
        width: 90%;
        max-width: 320px;
        height: 280px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }

    .modal-content {
        padding: 25px 20px;
    }
}

/* Small phones (320px - 480px) */
@media (max-width: 480px) {
    .homepage-container {
        padding: 0 15px;
    }

    .main-logo {
        margin: 30px 20px;
        width: 90%;
        max-width: 100%;
        height: auto;
    }

    /* Hero Section */
    .hero-section {
        padding: 15px 10px;
    }

    .hero-section h1 {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
        padding: 0 10px;
    }

    /* Override inline styles for mobile */
    .hero-actions[style] {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: center !important;
    }

    .hero-actions>div[style] {
        width: 100%;
        max-width: 280px;
    }

    .hero-actions button {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
        padding: 12px 20px;
    }

    .hero-actions small {
        font-size: 12px;
    }

    /* Slideshow */
    #slideshow {
        width: 90%;
        max-width: 300px;
        height: 260px;
        margin: 20px auto 0;
    }

    /* Pricing Section */
    .pricing-section {
        padding: 20px 10px;
    }

    .pricing-section h2 {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    .section-subtitle {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
    }

    .pricing-card {
        padding: 20px 18px;
    }

    .pricing-header h3 {
        font-size: 1.2rem;
    }

    .price {
        font-size: 1.1rem;
    }

    .features-list li {
        font-size: 0.85rem;
        padding: 6px 0;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        padding: 20px 18px;
        margin: 10px;
    }

    .modal-content h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .modal-content>p {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .modal-buttons button {
        width: 100%;
        min-height: 44px;
    }

    .modal .form-group {
        margin-bottom: 12px;
    }

    .modal .input-icon input {
        font-size: 16px;
        /* Prevents zoom on iOS */
        min-height: 44px;
    }
}

/* Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .main-logo {
        width: 85%;
        max-width: 100%;
        height: auto;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-actions[style] {
        gap: 20px !important;
    }

    .hero-actions button {
        min-height: 46px;
    }

    .pricing-section h2 {
        font-size: 2rem;
    }

    .pricing-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        max-width: 600px;
    }
}

/* Large tablets/small desktops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .homepage-container {
        padding: 0 30px;
    }

    .hero-section h1 {
        font-size: 2.4rem;
    }

    #slideshow {
        width: 340px;
        height: 290px;
    }

    .pricing-grid {
        max-width: 800px;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    .modal-close {
        padding: 8px;
        font-size: 28px;
    }

    /* Prevent accidental double-tap zoom */
    button,
    a,
    input,
    select,
    textarea {
        touch-action: manipulation;
    }

    /* Better button feedback */
    button:active {
        transform: scale(0.98);
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-wrapper {
        gap: 20px;
    }

    .hero-section {
        padding: 10px;
    }

    .hero-section h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    #slideshow {
        width: 280px;
        height: 240px;
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Very small screens (< 360px) */
@media (max-width: 359px) {
    .hero-section h1 {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    #slideshow {
        max-width: 280px;
        height: 240px;
    }

    .pricing-card {
        padding: 18px 15px;
    }
}