:root {
    --primary-color: #fe8800;
    --secondary-color: #0c4e8a;
    --accent-color: #2a9d8f;
    --text-color: #333;
    --light-text: #666;
    --lightest-text: #999;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    
    --color-safran: #FFA726;
    --color-forest: #2E7D32;
    --color-azure: #0288D1;
    --color-sand: #F5F5DC;
    --color-coal: #212121;
    --card-shadow: 0 5px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Circuit Cards */
.circuitsgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.circuitcard {
    background-color: var(--color-sand);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
}

.circuitcard:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.circuitimage {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 8px;
    margin-bottom: 15px;
    width: 100%;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.circuitbadge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.circuitcontent {
    padding: 20px;
    color: var(--secondary-color);
}

.circuittitle {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.circuitrating {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.circuitrating i {
    color: #ffc107;
    margin-right: 2px;
}

.circuitrating span {
    color: var(--lightest-text);
    margin-left: 5px;
}

.circuitdescription {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.circuitfeatures {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.feature {
    text-align: center;
    flex: 1;
}

.featureicon {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 16px;
}

.featurevalue {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2px;
}

.featurelabel {
    font-size: 12px;
    color: var(--lightest-text);
}

.circuitprice {
    display: flex;
    align-items: baseline;
    margin-bottom: 15px;
}

.pricelabel {
    font-size: 12px;
    color: var(--light-text);
    margin-right: 5px;
}

.pricevalue {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.priceperiod {
    font-size: 14px;
    color: var(--lightest-text);
    margin-left: 5px;
}

.circuitbuttons {
    display: flex;
    gap: 10px;
}

.circuitbutton {
    flex: 1;
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.circuitbutton.see-more {
    background-color: var(--white);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.circuitbutton:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Expanded Circuit Styling */
.expandedcircuit {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    animation: expandCircuit 0.5s ease forwards;
    max-width: 100%;
}

@keyframes expandCircuit {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.circuitdetails {
    padding: 25px;
}

.expandedheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.expandedtitle-section {
    width: 70%;
}

.expandedtitle-section h2 {
    font-size: 26px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.expandedrating {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.closeexpanded {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--light-text);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.closeexpanded:hover {
    color: var(--text-color);
}

.expandedgallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.galleryimage {
    height: 150px;
    border-radius: 5px;
    background-size: cover;
    background-position: center;
    width: 100%;
}

.expandeddescription {
    margin-bottom: 20px;
    color: var(--light-text);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.expandedfeatures {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.expandedfeature {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.expandedfeature i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 18px;
    width: 18px;
}

.expandedfeature span {
    font-size: 14px;
    color: var(--text-color);
}

.expandedprice {
    background-color: #f0f8ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.priceheader {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.pricedetails {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    flex-wrap: wrap;
}

.totalprice {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 16px;
    flex-wrap: wrap;
}

.expandedbuttons {
    display: flex;
    gap: 15px;
}

.expandedbutton {
    flex: 1;
    padding: 12px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    font-size: 16px;
}

.expandedbutton.reserve {
    background-color: var(--primary-color);
    color: var(--white);
}

.expandedbutton.share {
    background-color: var(--white);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.expandedbutton:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Comments Section */
.commentssection, .comments-section {
    background-color: #f0f8ff;
    border-left: 1px solid #e0e0e0;
    padding: 25px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    position: relative;
    overflow-y: auto;
    max-height: 800px;
}

.commentsheader, .comments-header {
    margin-bottom: 20px;
}

.commentsheader h3, .comments-header h3 {
    font-size: 20px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.commentscounter, .comments-counter {
    font-size: 14px;
    color: var(--light-text);
}

.comment {
    background-color: var(--white);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.commentheader {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.commentavatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-weight: 600;
}

.commentuser {
    flex: 1;
}

.commentname {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.commentdate {
    font-size: 12px;
    color: var(--lightest-text);
}

.commentrating {
    font-size: 12px;
    color: #ffc107;
}

.commentcontent {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.commentphotos {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.commentphoto {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    background-size: cover;
    background-position: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.pagination-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--white);
    color: var(--text-color);
}

.pagination-button.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination-button:hover:not(.active) {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.pagination-button.prev, .pagination-button.next {
    width: auto;
    padding: 0 15px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .expandedcircuit {
        grid-template-columns: 1fr;
    }
    
    .circuitimage {
        height: 600px;
    }
    
    .commentssection, .comments-section {
        border-left: none;
        border-top: 1px solid #e0e0e0;
        border-radius: 0 0 10px 10px;
        max-height: 400px;
    }

    .expandedgallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .circuitimage {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .circuitsgrid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .circuitimage{
        width:300px;
    }

    .sectiontitle {
        font-size: 28px;
    }

    .sectionsubtitle {
        font-size: 16px;
    }

    .expandedgallery {
        grid-template-columns: 1fr;
    }

    .expandedbuttons {
        flex-direction: column;
    }
    
    .expandedheader {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .closeexpanded {
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 22px;
    }
    
    .expandedtitle-section h2 {
        font-size: 22px;
        margin-top: 10px;
    }
    
    .circuitimage {
        height: 160px;
    }
    
    .expandedfeatures {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .pagination-button {
        width: 35px;
        height: 35px;
        margin: 0 3px;
    }
}

@media (max-width: 480px) {
    .circuitsgrid {
        grid-template-columns: 1fr;
    }

    .circuitbuttons {
        flex-direction: column;
    }
    
    .circuitdetails, .comments-section, .commentssection {
        padding: 15px;
    }
    
    .expandedheader {
        margin-bottom: 15px;
    }
    
    .expandedtitle-section h2 {
        font-size: 20px;
    }
    
    .circuitimage {
        height: 140px;
    }
    
    .expandedgallery {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .galleryimage {
        height: 120px;
    }
    
    .expandeddescription {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .expandedfeatures {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .expandedprice {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .priceheader {
        font-size: 16px;
    }
    
    .pricedetails, .totalprice {
        font-size: 14px;
    }
    
    .expandedbutton {
        padding: 10px;
        font-size: 14px;
    }

    .pagination-button {
        width: 30px;
        height: 30px;
        margin: 0 2px;
        font-size: 12px;
    }

    .pagination-button.prev, .pagination-button.next {
        padding: 0 10px;
    }
}

@media (max-width: 360px) {
    .circuitdetails, .comments-section, .commentssection {
        padding: 10px;
    }
    
    .expandedtitle-section h2 {
        font-size: 18px;
    }
    
    .circuitimage {
        height: 120px;
    }
    
    .galleryimage {
        height: 100px;
    }
    
    .expandedfeature i {
        font-size: 16px;
        width: 16px;
    }
    
    .expandedfeature span {
        font-size: 13px;
    }
    
    .priceheader {
        font-size: 15px;
    }
    
    .pricedetails, .totalprice {
        font-size: 13px;
    }
    
    .expandedbutton {
        padding: 8px;
        font-size: 13px;
    }
    
    .expandedcircuit {
        margin: 0 5px 20px;
    }
    
    .comment {
        padding: 10px;
    }
    
    .commentavatar {
        width: 35px;
        height: 35px;
    }
    
    .commentphoto {
        width: 50px;
        height: 50px;
    }
}