/* -------------------- Global Styles -------------------- */
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f8f9fa;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.subtitle {
    margin-top: 0; 
    margin-bottom: 0;
    font-size: 3.8rem;
    font-weight: 700;
}

.my-container {
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 50px;
    margin-bottom: 50px;
    flex: 1;
}

.my-container p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
}

a {
    color: #a8c8e4;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #7da4c9;
}

/* -------------------- Hero Section -------------------- */
.hero {
    background-image: url("../images/home_background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
    color: #1a3f6b;
}

.hero-subtitle {
    background-image: url("../images/home_background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #1a3f6b;
    margin-bottom: 30px;
    position: relative;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 700;
    margin-top: -20px;   
    margin-bottom: 30px; 
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #44545f;
}

.hero .custom-btn {
    padding: 12px 30px;
    margin-top: 30px;
    margin-bottom: 10px;
}

/* -------------------- Products display on home page (index.html)-------------------- */
.section-title {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a3f6b; 
    margin-bottom: 30px;
}

.products {    
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.product-card {
    position: relative;
    width: 180px;
    height: 180px;
    cursor: pointer;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}
.product-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #adcdeb ;
    color: #1a3f6b;
    text-align: center;
    padding: 5px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size:small;
    font-weight: bold;
}

.product-name:hover {
    text-decoration: underline;
}

.product-card:hover img{
    transform: scale(1.05); /* grow image slightly on hover */
}

.product-card:hover .product-name{
    opacity:1;
}

/* -------------------- Navbar -------------------- */
.navbar-brand img {
    border-radius: 8px;
}

.navbar-nav {
    margin: 0 auto;
}

.navbar-nav .nav-link {
    font-size: 1.2rem;
    color: #333f4f;
    padding: 5px 10px;
    border-radius: 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-nav .nav-link.active {
    font-weight: 700; 
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    background-color: rgba(168, 200, 228, 0.3);
    color: #1a3f6b;
    font-weight:600;
}

/* Cart icon treated as nav-link */
.cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 12px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cart-icon:hover {
    background-color: rgba(168, 200, 228, 0.3);
    transform: scale(1.05);
}

.cart-icon img {
    width: 25px;
    height: 25px;
    display: block;
    transition: transform 0.3s ease;
}

/* -------------------- Mobile collapsed navbar -------------------- */
@media (max-width: 768px) {
    .navbar-collapse .navbar-nav {
        flex-direction: column;
        align-items: center;
    }

    .navbar-collapse .nav-item {
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }

    .cart-icon {
        transform: none; /* disable pop on mobile */
    }
}

/* -------------------- Buttons -------------------- */
.custom-btn {
    display: inline-block;
    background-color: #1b81da;    
    color: white;
    padding: 8px 22px;
    border: 2px solid transparent; 
    border-radius: 50px;      
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    margin-top: 18px;  
}

.custom-btn:hover {
    background-color: #adcdeb;
    color:#1a3f6b;
    border-color:#1a3f6b;
    transform: translateY(-2px);
}

.filter-buttons {
    text-align: center;
    margin-bottom: 20px;
}

.filter-buttons button {
    padding: 8px 16px;
    margin: 5px;
    border: none;
    border-radius: 8px;
    background-color: #adcdeb;
    color: #1a3f6b;
    cursor: pointer;
    transition: 0.3s;
}

.filter-buttons button:hover {
    background-color: #7da4c9;
    color:white;
}

/* -------------------- Product Cards -------------------- */

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(168, 200, 228, 0.2);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 10px 0 5px 0;
    cursor: pointer;
    transition: text-shadow 0.3s ease, text-decoration 0.3s ease;
}

.card-title:hover {
    text-decoration: underline;
    text-shadow: 1px 1px 1px rgba(26, 63, 107, 0.5);
}

.card img {
    padding: 10px;
}

.card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* -------------------- Footer -------------------- */
footer {
    background-color: #f8f9fa;
    color: #939393;
    font-size: 0.9rem;
    padding: 16px;
    text-align: center;
    margin-top: 20px;
}

/* -------------------- Contact Us page elements -------------------- */
.icon {
    width: 28px;
    height: 28px;
    margin-left: 10px;
    margin-right:10px;
    position: relative;
    top: -2px;
}

input.is-invalid,
textarea.is-invalid {
    border-color: #7da4c9;
}

#contactForm div {
    margin-bottom: 20px;
}

#contactForm input,
#contactForm textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    font-style: italic;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.error-msg {
    color: red;
    display: none;
    font-size: 0.85rem;
    margin-top: 5px;
}

.contact-wrapper {
    display: flex;
    justify-content: center;     
    align-items: flex-start;     
    gap: 40px;
    margin: 0 300px;              
    padding: 20px;
    border-left: 0;
}

.contact-info h3 {
    margin-bottom: 30px;
    color: #1a3f6b;
}
.contact-info p,
.contact-info a {
    display: block;
    margin-bottom: 20px;
}

.contact-form, 
.contact-info {
    flex: 1;
}

.contact-form {
    padding-right: 50px;
    border-right: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info {
    padding-left: 20px;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.phone-number:hover {
    text-decoration: underline;
    color: #7da4c9;
    cursor: pointer; 
}

/* -------------------- Mobile screen -------------------- */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
        margin-top: 0;
    }

    .hero-content p {
        font-size: 1.2rem;
        margin-bottom: 40px;
    }

    .hero .custom-btn {
        margin-top: 50px;
    }

    .my-container {
        padding:0 60px;
    }

    .subtitle {
		font-size: 3rem;
    }

    .card {
        width: 90%;
    }
	
	.contact-wrapper {
		flex-direction: column;
        gap: 20px;
        padding-bottom: 15px;
        margin: 0 auto;
    }

    .contact-form {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #ccc;
        padding-bottom: 30px;
    }

    .contact-info {
        padding-left: 0;
        padding-top: 15px;
    }
}
