/* ========== PROFESSIONAL BUSINESS STYLESHEET ========== */

/* ========== ROOT & GLOBAL STYLES ========== */
:root {
    --primary-color: #1e3a5f;
    --secondary-color: #2a5fa7;
    --accent-color: #e74c3c;
    --light-gray: #ecf0f1;
    --medium-gray: #bdc3c7;
    --dark-gray: #34495e;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--light-gray);
    padding-bottom: 140px;
}

body.home {
    min-height: 100vh;
    position: relative;
    background-color: var(--dark-gray);
    color: var(--white);
}

body.home::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: url("images/Ans-Main-PC.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(10px) brightness(0.55);
    transform: scale(1.05);
}

body.home::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(18, 33, 63, 0.35);
}

body.page-background {
    min-height: 100vh;
    position: relative;
    background-color: var(--dark-gray);
    color: var(--white);
}

body.page-background::before,
body.page-background::after {
    content: "";
    position: fixed;
    inset: 0;
}

body.page-background::before {
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(10px) brightness(0.55);
    transform: scale(1.05);
}

body.bg-main::before {
    background-image: url("images/Ans-Main-PC.jpg");
}

body.bg-alt::before {
    background-image: url("images/Ans-Main-PC2.jpg");
}

body.page-background::after {
    background: rgba(18, 33, 63, 0.35);
}

body.page-background header,
body.page-background section,
body.home header,
body.home section {
    position: relative;
    z-index: 1;
    color: var(--dark-gray);
}

body.page-background header h1,
body.home header h1 {
    color: var(--white);
}

body.page-background section h2,
body.home section h2 {
    color: var(--dark-gray);
    border-bottom-color: rgba(42, 95, 167, 0.45);
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

h1 {
    font-size: 2.5em;
    text-align: center;
}

h2 {
    font-size: 2em;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.3em;
    text-align: center;
}

h3 {
    font-size: 1.5em;
}

p {
    margin-bottom: 1em;
    color: var(--dark-gray);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

/* ========== HEADER & NAVIGATION ========== */
header {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.65) 0%, rgba(42, 95, 167, 0.65) 100%);
    color: var(--white);
    padding: 2rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 101;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

header h1 {
    color: var(--white);
    margin: 0.5rem 0;
    font-size: 1.8em;
}

nav {
    margin-top: 1.5rem;
}

nav ul {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    color: var(--white);
    padding: 0.75rem 1.5rem;
    display: block;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

nav ul li a:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom-color: var(--accent-color);
    color: var(--white);
}

/* ========== MAIN CONTENT ========== */
body > section {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-height: calc(100vh - 240px);
}

/* Index page specific styling - narrower content */
body.home > section {
    max-width: 1000px;
}

/* Contact page specific styling - wider content on larger screens */
body.page-background.bg-main > section {
    max-width: 1400px;
}

section {
    padding: 2rem;
}

section ul {
    margin: 1rem 0 1.5rem 0;
    padding-left: 1.5rem;
    color: var(--dark-gray);
}

section ul li {
    margin-bottom: 0.75rem;
    line-height: 1.55;
}

/* ========== BUTTONS ========== */
button, .btn {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

button:hover, .btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

button:active, .btn:active {
    transform: translateY(0);
}

/* ========== FORMS ========== */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
}

/* Contact page form - wider on larger screens */
body.page-background.bg-main form {
    max-width: 800px;
}

label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="phone"],
input[type="password"],
textarea,
select {
    padding: 0.75rem;
    border: 2px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--white);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="phone"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(42, 95, 167, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Larger textarea width on bigger screens */
@media (min-width: 768px) {
    textarea {
        width: 100%;
        max-width: 700px;
    }
}

@media (min-width: 1024px) {
    textarea {
        max-width: 900px;
    }
}

@media (min-width: 1440px) {
    textarea {
        max-width: 1000px;
    }
}

/* ========== CONTACT INFO ========== */
.contact-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin: 0.5rem 0;
}

/* ========== GALLERY ========== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery img,
.gallery video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    display: block;
}

.gallery img:hover,
.gallery video:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.media-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.media-filter span {
    font-weight: 600;
}

.filter-btn {
    border: 1px solid var(--dark-blue);
    background: var(--white);
    color: var(--dark-blue);
    padding: 0.5rem 0.9rem;
    min-width: 5rem;
    text-align: center;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active {
    background: rgba(30, 58, 95, 0.12);
    color: var(--gray-dark);
    border-color: rgba(30, 58, 95, 0.35);
}

.filter-btn:hover {
    background: var(--dark-blue);
    color: var(--white);
    border-color: var(--dark-blue);
}

.hidden {
    display: none !important;
}

/* ========== CAROUSEL / SCROLLABLE GALLERY ========== */
.carousel-container {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.carousel {
    display: flex;
    transition: transform 0.5s ease;
    scroll-behavior: smooth;
}

.carousel-item {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--light-gray);
    position: relative;
}

.fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: none;
    z-index: 10;
    text-align: center;
    line-height: 32px;
    padding: 0;
    font-family: Arial, sans-serif;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.fullscreen-exit-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.fullscreen-exit-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
    .fullscreen-exit-btn {
        top: auto;
        bottom: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 48px;
        height: 48px;
        font-size: 20px;
        text-align: center;
        line-height: 48px;
        display: block;
    }
}

.carousel-item img,
.carousel-item video {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.carousel-item video {
    width: 100%;
    height: auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(30, 58, 95, 0.7);
    color: var(--white);
    border: none;
    padding: 1rem 0.75rem;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
    transition: var(--transition);
    user-select: none;
}

.carousel-btn:hover {
    background-color: var(--accent-color);
}

.carousel-btn.prev {
    left: 1rem;
}

.carousel-btn.next {
    right: 1rem;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.indicator {
    width: 20px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--medium-gray);
    cursor: pointer;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    border: none;
    padding: 0;
    opacity: 0.6;
    box-shadow: none;
}

.indicator:hover {
    opacity: 0.8;
    background-color: var(--medium-gray);
    transform: none;
    box-shadow: none;
}

.indicator.active {
    background-color: var(--secondary-color);
    opacity: 1;
    box-shadow: 0 0 8px rgba(42, 95, 167, 0.4);
}

/* ========== FOOTER ========== */
footer {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.88) 0%, rgba(42, 95, 167, 0.88) 100%);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 102;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

footer p {
    color: var(--white);
    margin: 0;
    font-size: 0.9em;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.5em;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav ul li a {
        padding: 0.5rem 1rem;
    }

    body > section {
        margin: 1rem auto 0;
        padding: 1.5rem;
        min-height: calc(100vh - 200px);
    }

    .carousel-item img {
        height: 300px;
    }

    .carousel-btn {
        padding: 0.75rem 0.5rem;
        font-size: 1.2em;
    }

    .carousel-btn.prev {
        left: 0.5rem;
    }

    .carousel-btn.next {
        right: 0.5rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .gallery img {
        height: 200px;
    }

    form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.4em;
    }

    h2 {
        font-size: 1.3em;
    }

    nav ul {
        flex-direction: column;
    }

    body > section {
        margin: 0.5rem auto 0;
        padding: 1rem;
        min-height: calc(100vh - 180px);
    }

    .carousel-item img {
        height: 250px;
    }

    .carousel-btn {
        padding: 0.5rem 0.4rem;
        font-size: 1em;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    button, .btn {
        padding: 0.75rem 1rem;
        font-size: 0.95em;
    }
}

@media (max-width: 768px) {
    body.home::before,
    body.bg-main::before,
    body.bg-alt::before {
        background-image: url("images/Ans-Main-Phone.jpg");
    }
}