/* Enhanced Visual Effects for who-won-mini.golf */

/* Subtle Background Pattern */
body {
    background-image: radial-gradient(#e8f4ff 1px, transparent 1px), radial-gradient(#e8f4ff 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    background-attachment: fixed;
}

/* Improved Hero Section with Animated Gradient */
.hero-section {
    background: linear-gradient(-45deg, #f8f9fa, #e8f4ff, #d4e9ff, #c5e1ff);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    border-bottom: 3px solid rgba(52, 152, 219, 0.3);
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Golf Ball Animation for Hero Section */
.hero-section::after {
    content: "⛳";
    position: absolute;
    font-size: 120px;
    opacity: 0.1;
    bottom: -30px;
    right: 10%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* Enhanced Feature Cards with Hover Effects */
.feature-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(41, 128, 185, 0.05) 100%);
    border-radius: 10px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card .emoji {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.feature-card:hover .emoji {
    transform: scale(1.2) rotate(10deg);
}

/* Pulsing Effect for CTA Buttons */
.hero-btn, .demo-btn, .trial-btn {
    position: relative;
    overflow: hidden;
    display: inline-block; /* Ensure buttons are inline-block for proper positioning */
}

.hero-btn::before, .demo-btn::before, .trial-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%; /* Increase size for better visibility */
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out; /* Adjust transition for smoother effect */
}

.hero-btn:hover::before, .demo-btn:hover::before, .trial-btn:hover::before {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.4; /* Increase opacity for more pronounced effect */
}

/* Animated Pricing Table Highlights */
table tr:hover {
    background-color: rgba(52, 152, 219, 0.1);
    transition: background-color 0.3s ease;
}

table tr:hover td {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* Improved Trial Offer with Animated Border */
.trial-offer {
    position: relative;
    background: linear-gradient(135deg, #f1f8ff 0%, #e8f4ff 100%);
    z-index: 1;
    overflow: hidden;
}

.trial-offer::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-radius: 10px;
    background: linear-gradient(45deg, #3498db, #2ecc71, #3498db) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    animation: border-rotate 6s linear infinite;
    z-index: -1;
}

@keyframes border-rotate {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

/* Enhanced Carousel Navigation */
.carousel-button {
    background: rgba(52, 152, 219, 0.7);
    transform: translateY(-50%) scale(0.9);
    transition: all 0.3s ease;
}

.carousel-button:hover {
    background: rgba(52, 152, 219, 1);
    transform: translateY(-50%) scale(1);
}

.carousel-dot {
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    transform: scale(1.3);
    background: rgba(52, 152, 219, 0.7);
}

.carousel-dot.active {
    background: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

/* Smooth Image Transitions for Carousel */
.carousel-track {
    transition: transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.carousel-slide img {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Animated Checkmarks in Feature Lists */
.trial-features p, .analytics-features p {
    position: relative;
}

.trial-features p::before, .analytics-features p::before {
    content: '✅';
    margin-right: 10px;
    display: inline-block;
    animation: checkmark-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

@keyframes checkmark-pop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Improved Form Inputs with Focus Effects */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Animated Submit Buttons */
.submit-btn, .submit-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.submit-btn::before, .submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.submit-btn:hover::before, .submit-button:hover::before {
    left: 100%;
}

/* Subtle Page Transition */
@keyframes page-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    animation: page-fade-in 0.5s ease-out;
}

/* Compact Table for Mobile */
@media (max-width: 768px) {
    table {
        font-size: 0.85em;
        margin: 20px auto; /* Center the table */
        width: 95%; /* Take up 95% of the width */
        max-width: 95%; /* Ensure it doesn't exceed 95% */
        table-layout: fixed; /* Fixed layout helps with width distribution */
        border-collapse: collapse; /* Ensure no gaps between cells */
    }
    
    table tr {
        width: 100%; /* Ensure rows take full width */
        display: table-row; /* Reinforce table row behavior */
    }
    
    table th, 
    table td {
        padding: 8px 5px;
        line-height: 1.3;
        vertical-align: top;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 0;
        display: table-cell; /* Reinforce table cell behavior */
        box-sizing: border-box; /* Include padding in width calculation */
    }
    
    /* Reduce font size for feature descriptions */
    table td:first-child {
        font-size: 0.9em;
        max-width: 100px;
        text-align: left;
    }
    
    /* Make checkmarks and X marks slightly larger for visibility */
    table td:not(:first-child):not(:last-child) {
        font-size: 1.1em;
    }
    
    /* Compact buttons */
    table .basic-btn,
    table .deluxe-btn,
    table .premium-btn {
        padding: 8px 10px;
        font-size: 0.9em;
        white-space: nowrap;
        min-width: auto;
    }
}

/* Even more compact for very small screens */
@media (max-width: 480px) {
    table {
        font-size: 0.75em;
        width: 95%; /* Take up 95% of the width */
        max-width: 95%; /* Ensure it doesn't exceed 95% */
        margin: 20px auto; /* Center the table */
        table-layout: fixed;
        border-collapse: collapse;
        display: table; /* Force table display */
    }
    
    table thead, 
    table tbody {
        width: 100%; /* Ensure thead and tbody take full width */
        display: table-row-group; /* Force table row group display */
    }
    
    table tr {
        width: 100%; /* Ensure rows take full width */
        display: table-row; /* Force table row display */
    }
    
    table th, 
    table td {
        padding: 6px 4px;
        max-width: 0;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        hyphens: auto !important;
        display: table-cell; /* Force table cell display */
    }
    
    /* Adjust column widths for very small screens */
    table th:first-child,
    table td:first-child {
        width: 35%;
        white-space: normal !important;
    }
    
    table th:not(:first-child),
    table td:not(:first-child) {
        width: 21.67%; /* Distribute remaining 65% equally */
        white-space: normal !important;
    }
    
    /* Force text wrapping in all cells at small screen sizes */
    table td {
        white-space: normal !important;
        overflow: visible !important;
    }
    
    /* Specifically target the long text cells */
    table tr:nth-child(6) td:first-child,
    table tr:nth-child(7) td:first-child {
        font-size: 0.7em; /* Even smaller font for very long descriptions */
        line-height: 1.2;
    }
    
    table .basic-btn,
    table .deluxe-btn,
    table .premium-btn {
        padding: 6px 4px;
        font-size: 0.85em;
    }
}