/* 
 Projekts: Ēdienu karte
 Autors: Margarita
 Apraksts: Dizains restorāna mājaslapai
*/
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #ffe1c4, #ffc690);
}

header {
    background: transparent;
}
/*izmēri */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: black;
    font-weight: bold;
}

nav a.active {
    border-bottom: 2px solid black;
}
/* lai būtu aktivas lapas*/
.page {
    display: none;
}

.page.active {
    display: block;
}

/* sākums, stils*/
.hero {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.hero-text {
    flex: 1;
}

.hero-img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .hero-img {
        width: 200px;
        height: 200px;
        margin: 20px auto;
    }
}


button {
    background: #ff8c42;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    font-weight: bold;
}

/* stils ēdienkartei*/
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.card {
    background: #f3f3f3;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}

.card-img {
    width: 100%;
    height: 200px; /* fiksēta augstums */
    object-fit: cover; /* saglabā proporcijas un aizpilda laukumu */
    border-radius: 8px;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* krāsa zg.*/
.stars {
    color: orange;
}

.price {
    font-weight: bold;
}

/* madal logs stils un izmēri*/

.modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background-color: #fff;
    padding: 20px;
    max-width: 700px;   /* var palielināt vai samazināt */
    width: 90%;
    border-radius: 10px;
    text-align: center;
    position: relative;
   

}

.modal-img {
    width: 100%;         /* bilde aizņem visu platumu */
    max-height: 400px;   /* var regulēt augstumu */
    object-fit: contain;  /* bilde saglabā proporcijas */
    border-radius: 10px;
    margin-bottom: 15px;
}

.back {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 50px;
    cursor: pointer;
}
/* teksta stili*/
.modal-box h3 {
    margin: 10px 0 5px 0;
    font-size: 20px;
}

.modal-box p {
    margin: 5px 0;
    font-size: 20px;
}

.modal-box .price {
    font-weight: bold;
    margin-top: 10px;
}
.rating{
    position: relative;
    left: 250px;
    font-size: 20px;
}

.rating span.active {
    color: gold;
}
/*komentāru stili */
.comment-input {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.comment-input textarea {
    flex: 1;
    height: 60px;
    padding: 8px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
    resize: vertical;
}

.comment-input button {
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    border: none;
    background-color: #4CAF50;
    color: white;
}

.comment {
    background-color: #f7f7f7;
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment button {
    background-color: transparent;
    border: none;
    color: red;
    font-weight: bold;
    cursor: pointer;
}

.comment span {
    flex: 1;
}


/* grafiks, stili un izmēri*/
.graph {
    margin-top: 30px;
    height: 200px;
    background: #ddd;
    border-radius: 15px;
    text-align: center;
    padding-top: 90px;
}


/* pop ēdieni, stils*/
.popular-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    width: 100%;
    max-width: 1200px;
    margin: auto;
}

.menu-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}
/* mazie kartītes*/
.card.small {
    width: 30%;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
}

.card.small img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

/* Mobilā versija */
@media (max-width: 800px) {
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .popular-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}
/* mazas kartes fiksēju*/
.card.small {
    display: block;
}
/* vertēšana stils*/
.rating {
    display: flex;
    gap: 6px;
}

.rating span {
    font-size: 30px;
    cursor: pointer;
    color: #ccc;
    transition: 0.2s;
}

.rating span.active {
    color: gold;
}

/*par mums lapa stils */
.about-box {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    max-width: 600px;
    margin-bottom: 40px;
}

.about-text {
    margin-top: 15px;
    color: #555;
}

.stats-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    flex: 1;
    min-width: 220px;
}

.stat-card h3 {
    margin-bottom: 10px;
}

.stat-card ul {
    padding-left: 18px;
}
/*rating stils ar izmēriem */
.big-rating {
    font-size: 32px;
    font-weight: bold;
    color: #ff9800;
}
.rating span {
    font-size: 26px;
    cursor: pointer;
    color: #ccc;
}

.rating span.active {
    color: gold;
}
/* komentāeu stils, un tas pogas*/
.comment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.comment-text {
    flex: 1;
    padding-right: 10px;
}

.comment-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 6px;
}

.comment-actions button:hover {
    transform: scale(1.1);
}
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0.95;
    transition: all 0.3s ease;
}

.notification.success { background-color: #4CAF50; }
.notification.warning { background-color: #f39c12; }
.notification.info { background-color: #3498db; }
.notification.error { background-color: #e74c3c; }