/* --- WhatsApp Button --- */
#whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 90px;
    background-color: #25D366;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#whatsapp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    /* Dark background matching theme */
    color: #fff;
    padding: 15px 0;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    display: none;
    /* Hidden by default, shown via JS */
}

.cookie-banner p {
    margin: 0;
    display: inline-block;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-banner a {
    color: #ffd700;
    /* Gold or Theme Accent Color */
    text-decoration: underline;
}

.cookie-banner button#accept-cookies {
    background-color: #ffd700;
    /* Theme Accent Color */
    color: #333;
    border: none;
    padding: 8px 20px;
    margin-left: 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cookie-banner button#accept-cookies:hover {
    background-color: #e6c200;
}

/* --- Popup Styles (Refining existing structure) --- */
#popup-overlay {
    display: none;
    /* Hidden by default */
    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: 10000;
    backdrop-filter: blur(5px);
}

#popup-container {
    position: relative;
    background-color: #fff;
    border-radius: 15px;
    /* More rounded */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 90%;
    width: 450px;
    /* Slightly narrower */
    text-align: center;
    animation: popupFadeIn 0.3s ease-out;
    border: none;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

#popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    z-index: 10;
    line-height: 1;
}

#popup-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

#popup-form {
    padding: 0;
    margin-top: 5px;
    /* Ensure space between text and form */
}

#popup-form input {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    /* Fix padding issue */
}

#popup-form button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    /* Or theme color */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

#popup-form button:hover {
    background-color: #0056b3;
}

/* --- Contact Form Loader --- */
#form-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #212749;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- SweetAlert2 Overrides --- */
.swal2-container {
    z-index: 20000 !important;
}

/* --- Popup Form Styles (Migrated from Inline) --- */
#popup-form-wrapper {
    padding: 20px 30px;
    text-align: center;
    background-color: #fff;
    position: relative;
    margin-top: -81px;
}

#popup-form {
    position: relative;
    z-index: 2;
}

#popup-form input.form-control {
    border-radius: 50px;
    padding: 10px 20px;
    border: 1px solid #ced4da;
    height: 45px;
    margin-bottom: 15px;
    /* Added spacing */
}

#popup-form button[type="submit"] {
    width: 100%;
    border-radius: 50px;
    padding: 10px;
    font-weight: bold;
    border: none;
    background-color: #7A210E;
    color: white;
    text-transform: uppercase;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 45px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

#popup-form button[type="submit"]:hover {
    background-color: #5a180a;
    /* Darker shade for hover */
}

/* Portfolio Page Fixes */
.portfolio-box {
    background-color: var(--white-color);
    box-shadow: 0px 18px 26px -10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    margin-bottom: 30px;
}

.portfolio-image {
    display: block;
    height: 230px;
    overflow: hidden;
    position: relative;
}

.portfolio-image.back-img {
    height: 230px;
    width: 100%;
    background-size: cover;
    background-position: center;
    transition: var(--transition-lg);
}

.portfolio-box:hover .portfolio-image.back-img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 30px;
}

.portfolio-content .h5-title {
    margin-bottom: 10px;
}

.portfolio-content .h5-title a {
    color: inherit;
    transition: var(--transition);
}

.portfolio-box:hover .portfolio-content .h5-title a {
    color: var(--secondary-color);
}

.portfolio-category ul li a {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}

.portfolio-content p {
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}