/* common.css - LensVista Project */

/* 1. Font-Face: Local Poppins (ensure fonts folder contains Poppins-Regular.ttf, Poppins-Italic.ttf) */
@font-face {
    src: url('../fonts/Montserrat-Regular.ttf') format('truetype');
    font-family: "LensVistaFont";
    font-style: normal;
    font-weight: 400;
    font-optical-sizing: auto;
}

@font-face {
    src: url('../fonts/Montserrat-Italic.ttf') format('truetype');
    font-family: "LensVistaFont";
    font-style: italic;
    font-weight: 400;
    font-optical-sizing: auto;
}

/* 2. Root Variables */
:root {
    --black: #000000;
    --white: #FFFFFF;
    --accent: #3498db;
    /* Photography-blue accent */
    --bg-light: #F9F9F9;
    --bg-dark: #1C1C1C;
    --txt-primary: #222222;
    --txt-secondary: #808080;
    --transition-time: 0.3s;

    --font: "LensVistaFont", sans-serif;

    --header-height: 70px;
    --footer-height: 60px;
    --container-max: 1440px;

    --gap-small: 8px;
    --gap-medium: 16px;
    --gap-large: 32px;
    --gap-xlarge: 48px;
}

/* 3. Global Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    line-height: 1.5;
    color: var(--txt-primary);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
}

input,
textarea,
select {
    font-family: var(--font);
}

/* 4. Container & Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-space-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-large);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-large);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-large);
}

.section {
    padding-top: 80px;
    padding-bottom: 80px;
}

/* 5. Header & Footer Base */
header {
    position: relative;
    width: 100%;
    height: var(--header-height);
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.footer {
    background-color: var(--bg-dark);
    color: var(--white);
    padding-top: 40px;
    padding-bottom: 40px;
    font-size: 0.9rem;
}

/* 6. Typography */
h1,
.h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--txt-primary);
    text-transform: capitalize;
}

h2,
.h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--txt-primary);
    text-transform: capitalize;
}

h3,
.h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--txt-primary);
    text-transform: capitalize;
}

p {
    font-size: 1rem;
    margin-bottom: var(--gap-medium);
    color: var(--txt-secondary);
}

.text-center {
    text-align: center;
}

/* 7. Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-small);
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color var(--transition-time) ease, transform var(--transition-time) ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    border: 2px solid var(--accent);
}

.btn-primary:hover {
    background-color: var(--white);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
}

/* 8. Link Underline Animation */
.link-underline {
    position: relative;
}

.link-underline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width var(--transition-time) ease;
}

.link-underline:hover::after {
    width: 100%;
}

/* 9. Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color var(--transition-time) ease, box-shadow var(--transition-time) ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* 10. Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.mt-50 {
    margin-top: 50px;
}

.mb-50 {
    margin-bottom: 50px;
}

.p-20 {
    padding: 20px;
}

.transition {
    transition: all var(--transition-time) ease;
}

/* 11. Image Hover Utility */
.img-hover-scale {
    transition: transform var(--transition-time) ease;
}

.img-hover-scale:hover {
    transform: scale(1.05);
}

/* 12. Section Overlay Utility */
.section-overlay {
    position: relative;
}

.section-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* 13. Fullscreen Hero Utility */
.section-fullscreen {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
}

/* 14. Swiper Overrides Placeholder */
.swiper-container {
    width: 100%;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 15. Animations Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 16. Media Queries with px Breakpoints */
/* Large Desktops */
@media (max-width: 1440px) {
    h1 {
        font-size: 1.875rem;
    }
}

/* Desktops */
@media (max-width: 1200px) {
    h1 {
        font-size: 1.75rem;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .flex-space-between {
        flex-direction: column;
        gap: var(--gap-large);
    }

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Mobile */
@media (max-width: 480px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

/* 17. Dark Mode Utility */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--bg-dark);
        color: var(--white);
    }

    header {
        background-color: #222;
        box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05);
    }

    .footer {
        background-color: #000;
    }

    input,
    textarea,
    select {
        background-color: #333;
        color: #fff;
        border-color: #444;
    }

    .btn-primary {
        background-color: var(--accent);
        color: var(--white);
    }

    .btn-primary:hover {
        background-color: var(--white);
        color: var(--accent);
    }
}