/* ==========================================
   1. GLOBAL & RESET STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #f3f8ff;
    color: #1c2c45;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* تنسيق الروابط العامة مع إضافة تأثير الانتقال */
a {
    color: #1565c0;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: #0f4c81;
}

/* انتقال عام للأزرار */
button {
    transition: 0.25s;
}

/* ==========================================
   2. HEADER & LANG SWITCH
   ========================================== */
header {
    text-align: center;
    padding: 50px 20px 35px;
    position: relative;
}

header h1 {
    font-size: 42px;
    color: #0f4c81;
    margin-bottom: 10px;
}

header p {
    font-size: 20px;
    color: #5b6777;
}

.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
}

.lang-switch button {
    margin-left: 6px;
    padding: 6px 10px;
    cursor: pointer;
}

/* ==========================================
   3. GRID & CARDS (INDEX PAGE)
   ========================================== */
.grid-container {
    width: 95%;
    max-width: 1150px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    padding-bottom: 50px;
}

.card {
    width: 360px;
    background: white;
    border-radius: 18px;
    overflow: hidden; 
    box-shadow: 0 8px 18px rgba(0,0,0,.08);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    color: inherit;
    cursor: pointer;
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-6px);
    border-color: #1565c0;
    box-shadow: 0 14px 28px rgba(21,101,192,.20);
}

.image {
    display: block;
    height: 190px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #d7e8ff;
    transition: transform .3s ease;
}

.card:hover .image {
    transform: scale(1.05);
}

.title {
    height: 50px;
    background: #1565c0;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 19px;
    font-weight: bold;
    transition: background .25s ease;
}

.card:hover .title {
    background: #0f4c81;
}

/* CARD BACKGROUND IMAGES */
.card1 { background-image: url("../images/solar-panels.png"); }
.card2 { background-image: url("../images/home-batteries.png"); }
.card3 { background-image: url("../images/heat-pumps.png"); }
.card4 { background-image: url("../images/ev-chargers.png"); }
.card5 { background-image: url("../images/electric-bikes.png"); }

/* ==========================================
   4. PRODUCT PAGES STYLES (TEMPLATE)
   ========================================== */
.product-container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto 50px;
    background: white;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(0,0,0,.05);
}

/* تنسيق العناوين داخل صفحات المنتجات */
.product-title {
    font-size: 36px;
    color: #0f4c81;
    text-align: center;
    margin-bottom: 30px;
}

.product-hero {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 30px;
    background-color: #d7e8ff;
}

.product-desc {
    font-size: 18px;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 30px;
}

.benefits-section {
    margin-bottom: 45px;
}

.benefits-section h3 {
    font-size: 22px;
    color: #0f4c81;
    margin-bottom: 15px;
}

.benefits-list {
    list-style: none;
}

.benefits-list li {
    font-size: 17px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    color: #1c2c45;
}

.benefits-list li::before {
    content: "✔";
    color: #10b981;
    font-weight: bold;
    margin-right: 12px;
}

.cta-wrapper {
    text-align: center;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    font-size: 20px;
    font-weight: bold;
    color: white;
    background: #1565c0;
    border-radius: 30px;
    transition: background 0.25s ease, transform 0.25s ease;
    box-shadow: 0 4px 12px rgba(21,101,192,0.3);
}

.cta-button:hover {
    background: #0f4c81;
    transform: translateY(-2px);
    color: white;
}

/* زر العودة للرئيسية */
.back-home {
    display: inline-block;
    margin-top: 35px;
    color: #1565c0;
    font-weight: bold;
}

.back-home:hover {
    text-decoration: underline;
}

/* ==========================================
   5. FOOTER STYLES
   ========================================== */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #6b7280;
    font-size: 14px;
    margin-top: auto;
}

footer hr {
    max-width: 900px;
    margin: 0 auto 20px;
    border: none;
    border-top: 1px solid #d8e2ef;
}

footer a:hover {
    text-decoration: underline;
}

/* ==========================================
   6. RESPONSIVE DESIGN
   ========================================== */
@media(max-width: 768px) {
    header h1 {
        font-size: 34px;
    }
    header p {
        font-size: 18px;
    }
    .card {
        width: 100%;
        max-width: 500px;
    }
    .product-container {
        padding: 20px;
    }
    .product-hero {
        height: 220px;
    }
}