:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --primary-light: #85c1e9;
    --accent-color: #f39c12;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 60px; /* Space for mobile nav */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 1.5rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    padding: 0.5rem;
    border-radius: 4px;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    
      background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('uploads/sa4.jfif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
 
    background-color: #2980b9;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #e67e22;
}

/* Section Styles */
section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 0.5rem auto;
}

 .services-grid, .products-grid {
    display: grid;
    gap: 2rem;
}

/* Large screens: force 3 in one row */
@media (min-width: 769px) {
    .services-grid, .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small screens: stack vertically (1 per row) */
@media (max-width: 768px) {
    .services-grid, .products-grid {
        grid-template-columns: 1fr;
    }
}


.service-card, .product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.service-card:hover, .product-card:hover {
    transform: translateY(-5px);
}

.card-img {
    height: 200px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: bold;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.price {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 2rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    position: relative;
}

.footer-section h3::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
    margin-top: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

 /* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    padding: 0.5rem 0;
}

.mobile-nav-menu {
    display: flex;
    justify-content: space-around;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu li {
    flex: 1;
    text-align: center;
}

.mobile-nav-menu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    color: var(--white);
    text-decoration: none;
    font-size: 0.8rem;
    transition: background-color 0.3s;
}

.mobile-nav-menu a.active {
    background-color: var(--primary-dark);
}

.mobile-nav-menu i {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.mobile-nav-menu span {
    display: block;
}




/* Video Section */
.video-section {
    padding: 4rem 0;
    background-color: var(--light-gray);
}

.video-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.video-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.video-placeholder {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-placeholder iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.video-info p {
    color: var(--text-color);
}





/* Admin Dashboard */
.admin-dashboard {
    max-width: 1000px;
    margin: 0 auto;
}

.admin-section {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.product-form .form-group {
    margin-bottom: 1rem;
}

.product-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.product-list th, .product-list td {
    padding: 0.8rem;
    border: 1px solid #ddd;
    text-align: left;
}

.product-list th {
    background-color: var(--primary-light);
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Admin Dashboard Improvements */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.product-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.product-list th, .product-list td {
    padding: 0.8rem;
    border: 1px solid #ddd;
    text-align: left;
}

.product-list th {
    background-color: var(--primary-light);
    position: sticky;
    top: 0;
}

.product-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.no-image {
    width: 50px;
    height: 50px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #999;
}


/* Admin Dashboard Improvements */
.admin-actions {
    text-align: right;
    margin-bottom: 1.5rem;
}

 
.btn-logout:hover {
    background-color: #c0392b;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-delete {
    background-color: #e74c3c;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Admin Product Cards */
.admin-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.admin-product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.admin-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.admin-product-image {
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
}

.admin-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-product-info {
    padding: 1.2rem;
    flex-grow: 1;
}

.admin-product-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.admin-product-price {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.admin-product-category {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    text-transform: capitalize;
}

.admin-product-actions {
    padding: 0 1.2rem 1.2rem 1.2rem;
    text-align: center;
}

.no-products {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Responsive Admin Styles */
@media (max-width: 768px) {
    .admin-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-product-image {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .admin-products-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-product-card {
        flex-direction: row;
        height: auto;
    }
    
    .admin-product-image {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
        border-radius: 5px;
    }
    
    .admin-product-info {
        padding: 0.8rem;
        flex-grow: 1;
    }
    
    .admin-product-actions {
        padding: 0.8rem;
        display: flex;
        align-items: center;
    }
    
    .btn-delete {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Form improvements */
.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #666;
    font-size: 0.8rem;
}

/* Product card images */
.card-img {
    height: 200px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: bold;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive table */
@media (max-width: 768px) {
    .product-list {
        font-size: 0.8rem;
    }
    
    .product-list th, .product-list td {
        padding: 0.5rem;
    }
    
    .product-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .no-image {
        width: 40px;
        height: 40px;
    }
}


/* Auto-dismissing alerts */
.auto-dismiss {
    position: relative;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    animation: progressBar 5s linear forwards;
}

.alert-success .alert-progress {
    background-color: rgba(255, 255, 255, 0.5);
}

.alert-error .alert-progress {
    background-color: rgba(255, 255, 255, 0.3);
}

@keyframes progressBar {
    0% { width: 100%; }
    100% { width: 0%; }
}

@keyframes slideIn {
    from { 
        transform: translateY(-20px); 
        opacity: 0;
    }
    to { 
        transform: translateY(0); 
        opacity: 1;
    }
}

@keyframes slideOut {
    from { 
        transform: translateY(0); 
        opacity: 1;
    }
    to { 
        transform: translateY(-20px); 
        opacity: 0;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 1rem 0;
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
     body {
        padding-bottom: 70px; /* Adjust space for the taller mobile nav */
    }
    
    /* Adjust footer to not be hidden by mobile nav */
    footer {
        margin-bottom: 70px;
    }
}

@media (max-width: 480px) {
    .mobile-nav-menu a {
        font-size: 0.7rem;
        padding: 0.4rem;
    }
    
    .mobile-nav-menu i {
        font-size: 1rem;
    }
}


/* Services page improvements */
.service-card {
    margin-bottom: 2rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.service-card li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.service-card p:last-child {
    margin-bottom: 0;
}

/* Responsive services layout */
@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card image improvements */
.card-img {
    height: 200px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.card-img {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.card-img i {
    font-size: 2.5rem;
    color: white;
}