/**
 * Sections Styles
 * 
 * @package CursorTheme
 */

/* Main Container */
.site-main {
    background: #161719;
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
    padding:0 0 50px 0;
}

/* Section Containers */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Categories Section */
.categories {
    margin: 3rem 0;
}

.categories h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: #2a2a2a;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #E63946;
}

.category-card p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.category-card .btn {
    background: #E63946;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.category-card .btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

/* Ad Banner Section */
.ad-banner {
    width: 1300px;
    height: 700px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 3px 3px 10px 3px black;
}

.ad-banner a {
    display: block;
    width: 100%;
    height: 100%;
}

.ad-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Home Subheader (only homepage) */
.home-subheader,
.home-topbar {
    margin: 0; /* stick directly under header */
    text-align: center;
    background: #1b1d1f; /* full-bleed dark bar */
    padding: 10px 0;
}

.home-subheader-h1 {
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
    color: #ffffff;
    display: inline-block;
    padding: 0;
    border-radius: 0;
}

.home-subheader-h1 .home-subheader-line {
    display: inline; /* keep text inline on one line */
    font-weight: 500;
    opacity: 0.9;
}

.home-subheader-h1 b,
.home-subheader-h1 strong {
    font-weight: 500;
}

.home-subheader-subtext {
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
    color: #ffffff;
}

.home-subheader-subtext b,
.home-subheader-subtext strong {
    font-weight: 500;
}

/* New top bar structure */
.top-bar-text {
    color: #ffffff;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.top-bar-text .hometitle {
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
}

.top-bar-text b,
.top-bar-text strong {
    font-weight: 500;
}

.top-bar-subtext {
    display: inline;
}

/* Mobile: Hide subtext, keep only H1 */
@media (max-width: 768px) {
    .top-bar-subtext {
        display: none;
    }
    
    .top-bar-text {
        white-space: normal;
        text-align: center;
    }
}

/* Header logo image sizing */
.site-logo-img {
    height: 50px;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .site-logo-img {
        height: 35px;
    }
}

/* FAQ/Accordion Section */
.faq-section {
    margin: 4rem 0;
    padding: 3rem 0;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #212121;
    border-radius: 10px;
    overflow: hidden;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-content {
    max-height: 1200px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-item:not(.active) .faq-content {
    max-height: 0;
    padding: 0 1.5rem;
    overflow: hidden;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
}

.faq-header h3 {
    color: #E63946;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.faq-icon {
    color: white;
    font-size: 1.5rem;
    font-weight: 300;
    width: 20px;
    text-align: center;
}

.faq-item.active .faq-icon {
    color: #E63946;
}

.faq-content {
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-content p {
    color: white;
    line-height: 1.8;
    margin: 0;
}



.categories-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 2rem 0;
    text-align: left;
}

.categories-grid-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: stretch; /* Assicura che tutte le card abbiano la stessa altezza */
}

.category-card-grid {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 2px 2px 10px 0px #000000;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    height: 100%;
}

.category-card-link:hover {
    transform: translateY(-5px);
}

.category-image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: transparent;
    display: block;
    border-radius: 0;
    overflow: hidden;
}

.category-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
}

.category-info {
    padding: 15px 10px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-link .category-link {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease;
    word-wrap: break-word;
    white-space: normal;
}

.category-link:hover {
    color: #E63946;
}

/* Most Popular Sites Section */
.most-popular {
    margin: 4rem 0;
    padding: 3rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 5px solid white;
    border-radius: 3px;
}

.section-icon {
    font-size: 1.5rem;
    color: #3b82f6;
}

.section-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.site-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 1px 1px 10px 3px rgba(0, 0, 0, 0.5);
}

.site-item:hover {
    transform: scale(1.05);
}

.site-link {
    text-decoration: none;
    color: inherit;
    position: relative;
    display: block;
}

/* Mobile overlay link - covers entire box on mobile */
.site-link-mobile {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: block;
    background: transparent;
}

/* Desktop: hide mobile overlay, show only buttons */
@media (min-width: 769px) {
    .site-link-mobile {
        display: none;
    }
}

.site-thumbnail {
    width: 100%;
    height: 100%;
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

.site-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
}

.site-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

.site-link:hover .site-thumbnail::before {
    background: rgba(0, 0, 0, 0.5);
}

.site-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.site-buttons {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: auto;
    z-index: 3;
}

.site-link:hover .site-buttons {
    opacity: 1;
}

.site-buttons a {
    text-decoration: none;
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
}

.site-buttons a:last-child {
    margin-bottom: 0;
}

.site-buttons a button {
    width: 100%;
    margin: 0;
}

.site-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.site-buttons button {
    background: #22c55e;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    width: 100%;
}

.site-buttons 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.5s ease;
}

.site-buttons button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5);
    background: #16a34a;
}

.site-buttons button:hover::before {
    left: 100%;
}

.site-buttons button.secondary {
    background: #f97316;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.site-buttons button.secondary:hover {
    background: #ea580c;
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
    transform: translateY(-3px) scale(1.02);
}

.site-name {
    display: none !important;
}

.section-footer {
    text-align: center;
}

.explore-all-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.explore-all-btn:hover {
    background: white;
    color: #161719;
}

/* Featured Section */
.featured {
    margin: 4rem 0;
    padding: 3rem 0;
    background: #1a1a1a;
}

.featured h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.featured-item {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.featured-item:hover {
    transform: translateY(-3px);
}

.featured-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.featured-item p {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Footer */
.site-footer {
    background: #222222;
    padding: 2rem 0 0;
    margin: 0;
    text-align: center;
}

.footer-logo {
    margin-bottom: 2rem;
    text-align: center;
}

.footer-logo h2 {
    background: linear-gradient(to bottom, #D62828, #E63946);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
}

/* Center footer image logo */
.footer-logo .site-logo-img {
    display: inline-block;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
}

.footer-links li {
    margin: 0;
    padding: 0;
    display: flex;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.footer-links a:hover {
    color: #E50914;
}

.footer-contact {
    margin-bottom: 3rem;
}

.footer-contact-btn {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.footer-contact-btn:hover {
    background: white;
    color: #222222;
}

.footer-copyright {
    background: #E63946;
    padding: 0.5rem 0;
}

.footer-copyright p {
    color: white;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Homepage padding on mobile */
    .directory-homepage .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .site-logo {
        font-size: 2.5rem;
    }
    
    .categories-grid-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .footer-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem 1.5rem;
        justify-items: start;
        max-width: 400px;
        margin: 20px 0 30px 40px;
    }
    
    .footer-links li {
        width: 100%;
        display: block;
    }
    
    .footer-links a {
        font-size: 0.9rem;
        text-align: left;
        display: block;
        width: 100%;
        font-weight: 500;
    }
    
    .footer-contact-btn {
        width: 90%;
        max-width: 100%;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .footer-logo h2 {
        font-size: 2rem;
    }
    
    /* Reduce spacing between hero and most popular section */
    .most-popular {
        margin: 1rem 0;
        padding: 1.5rem 0;
    }
    
    .section-header {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }
    
    /* Add space between brands and Explore All button on mobile */
    .sites-grid {
        margin-bottom: 3rem;
    }
    
    /* Disable hover effects on mobile */
    .site-item:hover {
        transform: none;
    }
    
    .site-link:hover .site-thumbnail::before {
        background: rgba(0, 0, 0, 0);
    }
    
    .site-link:hover .site-buttons {
        opacity: 0;
    }
    
    .site-overlay {
        display: none !important;
    }
    
    .site-buttons {
        display: none !important;
    }
    
    /* Fix ad-banner on mobile */
    .ad-banner {
        width: calc(100% - 40px);
        max-width: 100%;
        height: 300px;
        margin: 0 20px;
        box-sizing: border-box;
    }
    
    /* Breadcrumb mobile - horizontal scroll */
    .breadcrumb {
        padding: 0.75rem 0;
        margin-top: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        border-radius: 0;
    }
    
    .breadcrumb::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .breadcrumb .container {
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
        min-width: 100%;
    }
    
    .breadcrumb-home,
    .breadcrumb-link,
    .breadcrumb-current,
    .breadcrumb-separator {
        white-space: nowrap;
        display: inline-block;
        flex-shrink: 0;
    }

    .section-header h2 {
        font-size: 28px;
    }
}

/* Breadcrumb Styles */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-top: 0;
    font-family: 'Inter', sans-serif;
    border-radius: 0;
}

.breadcrumb .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0;
}

.breadcrumb-home {
    color: #cccccc;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.breadcrumb-home:hover {
    color: #E63946;
}

.breadcrumb-separator {
    color: #666666;
    margin: 0 0.5rem;
    font-size: 13px;
    font-weight: 400;
}

.breadcrumb-link {
    color: #cccccc;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #E63946;
}

.breadcrumb-current {
    color: #E63946;
    font-size: 15px;
    font-weight: 400;
}
