/* Custom Styles for PickWebsiteHosting.com */

/* Sticky Sidebar for Promotions */
.sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
}

/* Custom Button Hover Effects */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Table Styling Overrides */
.comparison-table th {
    background-color: #f8fafc;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table tr:hover {
    background-color: #f0f9ff;
}

/* Review Score Circle */
.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
}

/* Custom List Bullets for Features */
.feature-list li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 0.5em;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #16a34a; /* Green-600 */
    font-weight: bold;
}

/* Cons List Bullets */
.cons-list li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 0.5em;
}

.cons-list li::before {
    content: "✕";
    position: absolute;
    left: 0;
    color: #dc2626; /* Red-600 */
    font-weight: bold;
}

/* Author Box Component */
.author-box {
    border-radius: 0.75rem; /* rounded-xl */
    border: 1px solid rgba(148, 163, 184, 0.5); /* gray-400/50 */
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.author-box:hover {
    box-shadow: 0 15px 30px -15px rgba(15, 23, 42, 0.4);
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.7); /* blue-500/70 */
}

.author-avatar {
    box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.7);
}

/* ==========================================
   MOBILE NAVIGATION MENU
   ========================================== */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Panel */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background-color: #ffffff;
    z-index: 101;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-menu-close:hover {
    background-color: #f3f4f6;
}

/* Mobile Menu Navigation Links */
.mobile-menu-nav {
    padding: 1rem 0;
}

.mobile-menu-nav a {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 52px;
    display: flex;
    align-items: center;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a:focus {
    background-color: #eff6ff;
    color: #2563eb;
}

.mobile-menu-nav a.active {
    color: #2563eb;
    background-color: #eff6ff;
    border-left: 3px solid #2563eb;
}

/* Hamburger Button Enhancement */
.mobile-menu-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
    background-color: #f3f4f6;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* ==========================================
   RESPONSIVE TABLE - CARD LAYOUT ON MOBILE
   ========================================== */

@media (max-width: 767px) {
    /* Hide table header on mobile */
    .comparison-table thead {
        display: none;
    }
    
    .comparison-table,
    .comparison-table tbody {
        display: block;
    }
    
    /* Convert rows to cards with Grid Layout */
    .comparison-table tr {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "rank provider rating"
            "features features features"
            "cta cta cta";
        gap: 0.75rem;
        margin: 0 0 1rem 0;
        padding: 1.1rem 1.1rem 1.15rem;
        border-radius: 1.1rem;
        border: 1px solid #e5e7eb;
        background-color: #ffffff;
        box-shadow: 0 6px 10px -4px rgba(15, 23, 42, 0.18);
        align-items: center;
    }
    
    .comparison-table tr.bg-blue-50 {
        border-color: #bfdbfe;
        background-color: #eff6ff;
        box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.1), 0 4px 6px -2px rgba(37, 99, 235, 0.05);
    }
    
    /* Cells reset */
    .comparison-table td {
        display: block;
        padding: 0;
        border: none;
    }
    
    /* 1. Rank */
    .comparison-table td:first-child {
        grid-area: rank;
        width: auto;
    }
    
    .comparison-table td:first-child .w-8 {
        margin: 0; /* Reset center align */
    }
    
    /* 2. Provider */
    .comparison-table td:nth-child(2) {
        grid-area: provider;
        padding-left: 0.5rem;
    }
    
    .comparison-table td:nth-child(2) .flex {
        margin-bottom: 0.25rem;
    }
    
    .comparison-table td:nth-child(2) img {
        height: 1.75rem;
        width: auto;
    }
    
    .comparison-table td:nth-child(2) .text-xl {
        font-size: 1.125rem;
        line-height: 1.2;
    }
    
    .comparison-table td:nth-child(2) .text-sm.text-green-600 {
        font-size: 0.75rem;
        line-height: 1;
        margin-bottom: 0;
    }
    
    /* Hide "Read Review" in the card header to clean up */
    .comparison-table td:nth-child(2) a {
        display: none;
    }
    
    /* 3. Features */
    .comparison-table td:nth-child(3) {
        grid-area: features;
        padding: 0.75rem 0 0.6rem;
        border-top: 1px solid #f3f4f6;
        border-bottom: 1px solid #f3f4f6;
        margin: 0.25rem 0;
    }
    
    .feature-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem 0.75rem;
    }
    
    .feature-list li {
        font-size: 0.82rem;
        line-height: 1.45;
        margin-bottom: 0;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    
    /* 4. Rating */
    .comparison-table td:nth-child(4) {
        grid-area: rating;
        text-align: right !important;
    }
    
    .comparison-table td:nth-child(4) .text-lg {
        font-size: 1rem;
        letter-spacing: -2px; /* Tighten stars */
    }
    
    .comparison-table td:nth-child(4) .text-sm {
        font-size: 0.875rem;
    }
    
    /* 5. CTA */
    .comparison-table td:nth-child(5) {
        grid-area: cta;
        display: flex;
        gap: 0.75rem;
        align-items: center;
    }
    
    .comparison-table td:nth-child(5) a.btn-primary {
        flex: 1;
        margin-bottom: 0;
        font-size: 0.97rem;
        padding: 0.7rem 0.9rem;
        border-radius: 0.8rem;
    }
    
    /* Re-introduce "Read Review" as a secondary button next to Visit Site if needed, 
       or just keep the Visit Site button prominent. 
       Let's add "Read Review" text link next to it or below. */
       
    .comparison-table td:nth-child(5) span {
        display: none;
    }
}

/* Extra-small phones: stack comparison card sections more comfortably */
@media (max-width: 380px) {
    .comparison-table tr {
        grid-template-columns: 1fr;
        grid-template-areas:
            "rank"
            "provider"
            "rating"
            "features"
            "cta";
    }

    .comparison-table td:nth-child(4) {
        text-align: left !important;
        margin-top: 0.35rem;
    }
}

/* ==========================================
   TOUCH TARGET OPTIMIZATION
   ========================================== */

@media (max-width: 767px) {
    /* Buttons - ensure 44px minimum */
    .btn-primary,
    button,
    input[type="submit"],
    a.block {
        min-height: 44px;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    /* Form inputs */
    input[type="email"],
    input[type="text"],
    input[type="password"],
    textarea,
    select {
        min-height: 48px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 0.75rem 1rem;
    }
    
    /* Links in lists */
    footer ul li a,
    .mobile-menu-nav a {
        display: block;
        padding: 0.75rem 0;
        min-height: 44px;
    }
    
    /* Table of Contents links */
    .bg-gray-50 ol li a {
        display: inline-block;
        padding: 0.5rem 0;
        min-height: 44px;
        line-height: 1.6;
    }
}

/* ==========================================
   MOBILE TYPOGRAPHY & SPACING
   ========================================== */

@media (max-width: 767px) {
    /* Reduce heading sizes */
    h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.375rem !important;
        line-height: 1.25;
    }
    
    h3 {
        font-size: 1.125rem !important;
    }
    
    /* Improve body text readability */
    .prose p,
    .prose li {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Reduce excessive padding on containers */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Article padding adjustment */
    article.bg-white {
        padding: 1.25rem !important;
    }
    
    /* Sidebar spacing on mobile */
    aside {
        margin-top: 1.5rem;
    }
    
    /* Footer grid stacking */
    footer .grid {
        gap: 2rem;
    }
    
    /* Pricing cards */
    .grid.grid-cols-1.md\\:grid-cols-3 > div {
        margin-bottom: 1rem;
    }
    
    /* Review summary box adjustments */
    .bg-gradient-to-r.from-blue-600 {
        padding: 1.25rem !important;
    }
    
    .bg-gradient-to-r.from-blue-600 .grid {
        gap: 0.75rem;
    }
    
    /* Score display on mobile */
    .bg-white\\/20 {
        padding: 0.75rem !important;
        min-width: auto !important;
    }
    
    /* Stats grid */
    .grid.grid-cols-2.md\\:grid-cols-4 {
        gap: 0.5rem;
    }
    
    .grid.grid-cols-2.md\\:grid-cols-4 > div {
        padding: 0.5rem;
    }
}

/* Small phone adjustments */
@media (max-width: 380px) {
    h1 {
        font-size: 1.5rem !important;
    }
    
    .mobile-menu {
        width: 100%;
        max-width: 100%;
    }
    
    /* Stack rating and CTA fully on very small screens */
    .comparison-table td:nth-child(4),
    .comparison-table td:nth-child(5) {
        display: block;
        width: 100%;
    }
}

/* ==========================================
   IMPROVED MOBILE CARDS & GRIDS
   ========================================== */

@media (max-width: 767px) {
    /* Review cards grid */
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
        gap: 1rem;
    }
    
    /* Card header padding */
    .rounded-xl .p-6.text-center.border-b {
        padding: 1rem;
    }
    
    /* Card body padding */
    .rounded-xl .p-6:not(.text-center) {
        padding: 1rem;
    }
    
    /* Alternative cards */
    .bg-white.border.border-gray-200.rounded-lg.p-5 {
        padding: 1rem;
    }
    
    /* Pros/Cons boxes */
    .bg-green-50.border,
    .bg-red-50.border {
        padding: 1rem;
    }
    
    .bg-green-50 ul li,
    .bg-red-50 ul li {
        font-size: 0.9375rem;
    }
}

/* ==========================================
   HERO SECTION MOBILE
   ========================================== */

@media (max-width: 767px) {
    .bg-gradient-to-r.from-blue-600.to-blue-800.text-white.py-16 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    .bg-gradient-to-r h1 {
        font-size: 1.75rem !important;
    }
    
    .bg-gradient-to-r p.text-xl {
        font-size: 1rem;
    }
}

