/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --secondary: #3498db;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --gray: #95a5a6;
    --light-gray: #bdc3c7;
    --success: #27ae60;
    --warning: #f39c12;
    --border: #ddd;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --radius: 10px;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    transition: var(--transition);
}

.skip-link:focus {
    top: 6px;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #f8f9fa;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 0.95rem;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.section-title {
    text-align: center;
    margin: 40px 0 30px;
    position: relative;
    font-size: 2rem;
    color: var(--dark);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Focus indicators for accessibility */
button:focus,
a:focus,
input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Header Styles */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logo image styling */
.logo-image {
    height: 50px;
    width: auto;
    display: block;
}

.nav {
    display: none;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--dark);
    margin: 3px 0;
    transition: var(--transition);
}

/* Reviews Section */
.reviews-section {
    padding: 40px 0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.review-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.badge-container {
    display: flex;
    gap: 8px;
    padding: 12px 15px 0;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.top-rated {
    background: #e8f5e9;
    color: var(--success);
}

.badge.users-choice {
    background: #e3f2fd;
    color: var(--secondary);
}

.badge.new {
    background: #fff8e1;
    color: var(--warning);
}

.review-image {
    height: 160px;
    overflow: hidden;
    position: relative;
}

/* Make only logo image clickable */
.review-image a {
    display: block;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* App image styling */
.app-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

/* Hover effect for clickable logo images */
.review-image a:hover .app-image {
    transform: scale(1.03);
    filter: brightness(1.05);
}

/* Focus styles for accessibility */
.review-image a:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    z-index: 2;
}

/* Fallback backgrounds with 20% intensity (80% transparency) */
.review-card:nth-child(1) .review-image .app-image[alt] {
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.3), rgba(255, 142, 83, 0.3));
}

.review-card:nth-child(2) .review-image .app-image[alt] {
    background: linear-gradient(45deg, rgba(79, 172, 254, 0.3), rgba(0, 242, 254, 0.3));
}

.review-card:nth-child(3) .review-image .app-image[alt] {
    background: linear-gradient(45deg, rgba(168, 237, 234, 0.3), rgba(254, 214, 227, 0.3));
    color: #555;
}

.review-card:nth-child(4) .review-image .app-image[alt] {
    background: linear-gradient(45deg, rgba(255, 154, 158, 0.2), rgba(254, 207, 239, 0.2));
}

.review-card:nth-child(5) .review-image .app-image[alt] {
    background: linear-gradient(45deg, rgba(212, 252, 121, 0.2), rgba(150, 230, 161, 0.2));
}

.review-card:nth-child(6) .review-image .app-image[alt] {
    background: linear-gradient(45deg, rgba(161, 196, 253, 0.2), rgba(194, 233, 251, 0.2));
}

/* Display fallback content */
.app-image[alt] {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 2rem;
}

.review-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.app-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
}

.app-number {
    background: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stars {
    color: #f1c40f;
    font-size: 1.1rem;
}

.score {
    color: var(--gray);
    font-weight: 500;
    font-size: 0.9rem;
}

.review-text {
    color: var(--gray);
    margin-bottom: 15px;
    flex: 1;
}

.pros-cons {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.pros, .cons {
    flex: 1;
    font-size: 0.9rem;
}

.pros h4, .cons h4 {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.pros h4 {
    color: var(--success);
}

.cons h4 {
    color: var(--warning);
}

.pros ul, .cons ul {
    list-style: none;
    padding-left: 5px;
}

.pros li, .cons li {
    padding: 4px 0;
    position: relative;
    padding-left: 18px;
}

.pros li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.cons li:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: var(--warning);
    font-weight: bold;
}

.visit-btn {
    width: 100%;
    padding: 10px;
    text-align: center;
    font-size: 0.95rem;
}

/* Testimonials Section */
.testimonials-section {
    padding: 40px 0;
    background: #f0f2f5;
}

.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-carousel {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-card {
    min-width: calc(33.333% - 20px);
    padding: 0 10px;
}

.testimonial-content {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    position: relative;
    margin: 0 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-content:before {
    content: """;
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 5rem;
    color: #f5f5f5;
    font-family: serif;
    line-height: 1;
    z-index: 0;
}

.testimonial-text {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    font-style: italic;
    color: var(--dark);
    flex: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-heart-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fdf2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #ffebee;
}

.author-heart-icon svg {
    display: block;
}

/* Heart color variations */
.testimonial-card:nth-child(2) .author-heart-icon {
    background: #f3f9ff;
    border-color: #e3f2fd;
}

.testimonial-card:nth-child(2) .author-heart-icon svg {
    fill: #3498db;
}

.testimonial-card:nth-child(3) .author-heart-icon {
    background: #f8fff8;
    border-color: #e8f5e8;
}

.testimonial-card:nth-child(3) .author-heart-icon svg {
    fill: #27ae60;
}

.testimonial-card:nth-child(4) .author-heart-icon {
    background: #fff8f0;
    border-color: #fff3e0;
}

.testimonial-card:nth-child(4) .author-heart-icon svg {
    fill: #f39c12;
}

.testimonial-card:nth-child(5) .author-heart-icon {
    background: #f5f0ff;
    border-color: #e1bee7;
}

.testimonial-card:nth-child(5) .author-heart-icon svg {
    fill: #9c27b0;
}

.testimonial-card:nth-child(6) .author-heart-icon {
    background: #f0f8ff;
    border-color: #e0f7fa;
}

.testimonial-card:nth-child(6) .author-heart-icon svg {
    fill: #03a9f4;
}

.author-info h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.author-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

.testimonial-rating {
    color: #f1c40f;
    margin-top: 10px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    gap: 15px;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-btn:hover {
    background: var(--primary);
    color: white;
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Comparison Table */
.comparison-section {
    padding: 40px 0;
    background: white;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
}

.comparison-table th {
    background: var(--primary);
    color: white;
    padding: 15px;
    text-align: left;
}

.comparison-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.rating-cell {
    color: #f1c40f;
    font-weight: bold;
}

.visit-cell {
    text-align: center;
}

.visit-cell .btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Safety Tips Section */
.safety-section {
    padding: 40px 0;
    background: #f8f9fa;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.tip-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    display: flex;
    gap: 15px;
}

.tip-icon {
    width: 50px;
    height: 50px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tip-content h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.tip-content p {
    color: var(--gray);
}

/* FAQ Section */
.faq-section {
    padding: 40px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    background: white;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: #f9f9f9;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
}

.faq-answer.open {
    padding: 20px;
    max-height: 500px;
}

.faq-answer p {
    margin: 10px 0;
    color: var(--gray);
}

/* About Section */
.about-section {
    padding: 60px 0;
}

.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    margin: 25px 0 15px;
    font-size: 1.5rem;
    color: var(--dark);
}

.about-list {
    margin: 15px 0 25px;
    padding-left: 20px;
}

.about-list li {
    margin-bottom: 10px;
    color: var(--gray);
}

.about-image {
    flex: 1;
    max-width: 500px;
}

.about-image .placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(45deg, #e74c3c, #3498db);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto 40px;
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.legal-content h2 {
    margin: 25px 0 15px;
    font-size: 1.5rem;
    color: var(--dark);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.legal-content p, .legal-content li {
    margin-bottom: 15px;
    color: var(--gray);
}

.legal-content ul, .legal-content ol {
    padding-left: 25px;
    margin: 15px 0;
}

.legal-content li {
    margin-bottom: 10px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-logo .logo-icon {
    width: 50px;
    height: 50px;
}

.footer-logo .logo-text {
    font-size: 1.8rem;
    color: white;
}

.footer-links h3,
.footer-contact h3 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    font-size: 1.3rem;
}

.footer-links h3:after,
.footer-contact h3:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--light-gray);
}

.footer-links a:hover {
    color: white;
}

.footer-contact a {
    color: var(--light-gray);
    display: block;
    margin-top: 10px;
}

.footer-contact a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    color: var(--light-gray);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--light-gray);
    font-size: 1.2rem;
}

.social-links a:hover {
    color: white;
}

/* 18+ Disclaimer */
.age-disclaimer {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    margin-top: 20px;
    border-radius: 5px;
    font-size: 0.85rem;
    text-align: center;
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 350px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transform: translateX(400px);
    transition: transform 0.4s ease;
}

.cookie-consent.visible {
    transform: translateX(0);
}

.cookie-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cookie-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.cookie-content {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.5;
}

.cookie-content a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.accept-all {
    background: var(--primary);
    color: white;
    border: none;
}

.accept-all:hover {
    background: var(--primary-dark);
}

.manage-cookies {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.manage-cookies:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Responsive Design */
@media (min-width: 768px) {
    .nav {
        display: block;
    }
    
    .nav ul {
        display: flex;
        list-style: none;
        gap: 25px;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .reviews-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .about-content {
        flex-direction: row;
    }
}

@media (min-width: 992px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .testimonial-card {
        min-width: 100%;
    }
    
    .testimonial-content {
        margin: 10px 0;
    }
    
    .carousel-nav {
        margin-top: 15px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .tips-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .cookie-consent {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(200px);
    }
    
    .cookie-consent.visible {
        transform: translateY(0);
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        max-width: 100%;
    }
    
    .logo-image {
        height: 40px;
    }
    
    /* Responsive table styles */
    .comparison-table,
    .comparison-table thead,
    .comparison-table tbody,
    .comparison-table th,
    .comparison-table td,
    .comparison-table tr {
        display: block;
    }
    
    .comparison-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .comparison-table tr {
        border: 1px solid var(--border);
        margin-bottom: 15px;
        border-radius: var(--radius);
        overflow: hidden;
    }
    
    .comparison-table td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    
    .comparison-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: var(--dark);
        text-align: left;
    }
    
    .visit-cell {
        text-align: right;
    }
    
    .visit-cell:before {
        display: none;
    }
    
    /* Mobile heart icons */
    .author-heart-icon {
        width: 50px;
        height: 50px;
    }
    
    .author-heart-icon svg {
        width: 20px;
        height: 20px;
    }
    
    /* Mobile logo image clickable area */
    .review-image a {
        height: 100%;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .badge {
        animation: none;
    }
    
    .review-image .placeholder,
    .author-avatar .placeholder {
        animation: none;
    }
    
    .testimonial-content:before {
        animation: none;
    }
    
    .cookie-consent,
    .testimonial-carousel {
        transition: none;
        animation: none;
    }
    
    /* Disable hover animations for reduced motion */
    .review-image a:hover .app-image {
        transform: none;
        filter: none;
    }
}

/* Animation for badges */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.badge {
    animation: pulse 2s infinite;
}