/* ===================================================
   MG PHOTOGRAPHY - COMPLETE REDESIGN
   Inspired by: Loray, Henry Ashford, Stefan Albro, Julien
   ===================================================
   
   DESIGN PRINCIPLES:
   - Large dramatic typography
   - Minimal, editorial layout
   - Orange accent (#e94e1a)
   - Clean grid gallery
   - Modern serif + sans-serif mix
   
*/

/* ============ FONTS ============ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ============ CSS RESET ============ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============ VARIABLES ============ */
:root {
    --black: #0d0d0d;
    --dark: #151515;
    --gray-dark: #1f1f1f;
    --gray: #999999;
    --gray-light: #cccccc;
    --white: #ffffff;
    --cream: #f8f6f3;
    --orange: #e94e1a;
    --orange-light: #ff6b3d;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Space Grotesk', -apple-system, sans-serif;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============ BASE ============ */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

html,
body {
    overscroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--white);
    background: var(--black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.fade-in {
    opacity: 1;
}

body.page-transition {
    opacity: 0;
    transition: opacity 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ============ TYPOGRAPHY ============ */
.boldonse-regular,
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 500;
}

/* ============ HEADER ============ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 50px;
    background: rgba(13, 13, 13, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s var(--ease);
}

header.scrolled {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 50px;
}

.logo-full {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-full img {
    width: 40px;
    height: 40px;
}

.logo-full h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* Navigation */
nav {
    display: flex;
    gap: 50px;
}

nav a {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-light);
    position: relative;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--white);
}

nav a.selected {
    color: var(--orange);
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 1px;
    background: var(--orange);
    transition: width 0.3s var(--ease);
}

nav a:hover::after,
nav a.selected::after {
    width: 100%;
}

/* Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 110;
}

.hamburger span {
    width: 25px;
    height: 1px;
    background: var(--white);
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--black);
    padding: 40px 50px;
    flex-direction: column;
    gap: 25px;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s var(--ease);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu.open {
    transform: scaleY(1);
}

/* ============ HERO ============ */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(13, 13, 13, 0.4) 0%,
            rgba(13, 13, 13, 0) 40%,
            rgba(13, 13, 13, 0) 60%,
            rgba(13, 13, 13, 1) 100%);
    z-index: 1;
}

.quote-wrapper {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 0 50px;
}

.quote {
    max-width: 550px;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
    color: var(--white);
}

.orange-foto {
    color: var(--orange);
    font-style: normal;
    font-weight: 600;
}

.quote-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 400;
    font-style: normal;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 35px;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    margin-top: 35px;
    background: transparent;
    border: 1px solid var(--orange);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.primary-btn:hover {
    background: var(--orange);
    color: var(--black);
}

/* Scroll Arrow */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.scroll-down span {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray-light);
}

.mouse-icon {
    width: 22px;
    height: 36px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    position: relative;
}

.mouse-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 6px;
    background: var(--orange);
    border-radius: 2px;
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% {
        top: 6px;
        opacity: 1;
    }
    100% {
        top: 18px;
        opacity: 0;
    }
}

/* ============ SERVICES ============ */
.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card {
    padding: 80px 50px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.4s var(--ease);
    transform-origin: center;
}

.card:last-child {
    border-right: none;
}

.card:hover {
    background: var(--dark);
    transform: scale(1.03);
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.quote-icon {
    font-family: var(--font-display);
    font-size: 120px;
    color: var(--orange);
    opacity: 0.25;
    position: absolute;
    top: 30px;
    left: 30px;
    line-height: 0.8;
}

.card p {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 500;
    font-style: italic;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.card-caption {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--gray-light);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* ============ GALLERY ============ */
.gallery {
    padding: 120px 0;
}

.gallery h2 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 400;
    font-style: italic;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.gallery>p {
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    max-width: 450px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.filter-btn {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 12px 28px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.filter-btn:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-btn.active {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--black);
}

.gallery-grid {
    display: flex;
    gap: 6px;
    padding: 0 6px;
}

.masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gallery-grid img {
    width: 100%;
    display: block;
    cursor: pointer;
    filter: brightness(0.9);
    transition: filter 0.5s var(--ease), transform 0.5s var(--ease);
    opacity: 0;
    transform: scale(0.95);
    animation: fadeUp 0.6s var(--ease) forwards;
}

.gallery-grid img.hidden {
    display: none;
}

.gallery-grid img:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
    z-index: 10;
    position: relative;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Image Popup */
.image-popup {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.98);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}

.image-popup.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.image-popup img {
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.95);
    transition: transform 0.4s var(--ease);
}

.image-popup.open img {
    transform: scale(1);
}

.image-popup .close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 2rem;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
}

.image-popup .close-btn:hover {
    color: var(--white);
}

/* ============ FOOTER ============ */
footer {
    padding: 60px 50px;
    background: var(--dark);
    text-align: center;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
    font-size: 0.75rem;
    color: var(--gray);
    letter-spacing: 0.05em;
    margin: 8px 0;
}

.mail-link {
    color: var(--orange);
    transition: color 0.3s ease;
}

.mail-link:hover {
    color: var(--orange-light);
}

/* ============ ABOUT PAGE ============ */
main {
    padding-top: 150px;
    flex: 1;
}

.main-who {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 100px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 60px 60px 60px;
}

.main-left h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.main-left h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -15px;
    width: 60px;
    height: 2px;
    background: var(--orange);
}

.main-left h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    font-style: italic;
    color: var(--orange);
    margin-top: 60px;
    margin-bottom: 20px;
}

.body-text {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    color: var(--gray-light);
    line-height: 1.9;
}

.body-text ul {
    list-style: none;
}

.body-text li {
    padding-left: 25px;
    margin-bottom: 12px;
    position: relative;
}

.body-text li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--orange);
}

.main-right {
    display: flex;
    align-items: flex-start;
    padding-top: 40px;
}

.main-right img {
    width: 100%;
    filter: grayscale(20%);
    transition: filter 0.5s var(--ease);
}

.main-right img:hover {
    filter: grayscale(0%);
}

/* ============ CONTACT PAGE ============ */
.services.services30 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 0 80px;
    border: none;
    margin-bottom: 100px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.services.services30 .card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    text-align: center;
    padding: 60px 50px;
    transition: all 0.4s var(--ease);
}

.services.services30 .card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(233, 78, 26, 0.3);
    transform: translateY(-5px);
}

.services.services30 .card h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 30px;
    color: var(--white);
}

.social-btn,
.email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 28px;
    margin-bottom: 15px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.social-btn img,
.email-btn img {
    width: 18px;
    height: 18px;
    filter: invert(0);
    transition: all 0.3s ease;
}

.social-btn:hover,
.email-btn:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--black);
}

.social-btn:hover img,
.email-btn:hover img {
    filter: invert(1) brightness(0);
    opacity: 1;
}

/* ============ UTILITIES ============ */
.caption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray);
    margin: 30px;
}

.merriweather-normal {
    font-family: var(--font-display);
}

/* Carousel */
.carousel {
    position: relative;
    width: 90%;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-images {
    display: flex;
    transition: transform 0.5s var(--ease);
}

.carousel-images img {
    flex-shrink: 0;
    width: 100%;
    max-width: 700px;
    margin: 0 15px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid var(--orange);
    color: var(--orange);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--orange);
    color: var(--black);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px var(--orange);
    }

    to {
        box-shadow: 0 0 20px var(--orange);
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .main-who {
        gap: 60px;
    }
}

/* Tablet verticale (iPad Air, etc.) */
@media (min-width: 768px) and (max-width: 1024px) {

    /* Quote più grande e allineata in basso su tablet */
    .quote-wrapper {
        padding: 0 40px;
        align-items: flex-end;
        padding-bottom: 100px;
    }

    .quote {
        font-size: 3.5rem !important;
        max-width: 90%;
        line-height: 1.3;
    }

    /* Chi sono - layout affiancato su tablet */
    .main-who {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        padding: 80px 40px 60px;
        align-items: start;
    }

    .main-right {
        order: 0;
        padding-top: 0;
    }

    .main-right img {
        max-width: 100%;
        height: auto;
        max-height: 500px;
        object-fit: cover;
    }

    .main-left h2 {
        font-size: 2.5rem !important;
        margin-bottom: 20px;
    }

    .main-left .body-text {
        font-size: 1.05rem;
        line-height: 1.9;
    }

    .main-left h4 {
        font-size: 1.4rem;
    }

    /* Testo generale più grande su tablet */
    .body-text,
    p,

    .card p {
        font-size: 2.5rem;
    }

    /* Contatti - cards affiancate */
    .services.services30 {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 40px;
    }



    /* Services cards più compatte */
    .services:not(.services30) {
        grid-template-columns: repeat(3, 1fr);
    }

    .card {
        padding: 50px 30px;
    }
}

@media (max-width: 900px) {
    header {
        padding: 25px 30px;
    }

    .hamburger {
        display: flex;
    }

    nav:not(.nav-menu) {
        display: none;
    }

    .nav-menu {
        display: flex;
    }

    .logo-full h2 {
        display: none;
    }

    .services:not(.services30) {
        grid-template-columns: 1fr;
    }

    .card {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 60px 40px;
    }

    .card:last-child {
        border-bottom: none;
    }


}

/* Solo per schermi più piccoli di tablet (sotto 768px) */
@media (max-width: 767px) {
    .quote {
        font-size: 1.8rem;
        max-width: 90%;
    }

    .main-who {
        grid-template-columns: 1fr;
        padding: 40px 30px;
    }

    .main-right {
        order: -1;
    }

    .main-right img {
        max-height: none;
    }

    .services.services30 {
        grid-template-columns: 1fr;
        padding: 0 20px;
        gap: 20px;
    }

    .services.services30 .card {
        padding: 40px 30px;
    }
}

@media (max-width: 600px) {
    header {
        padding: 20px;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        padding-top: 70px;
    }
    
    .hero-image {
        position: relative;
        height: 40vh;
        width: 100%;
        inset: auto;
    }
    
    .hero::before {
        display: none;
    }

    .quote-wrapper {
        position: relative;
        inset: auto;
        padding: 40px 25px 20px;
        flex: 1;
        align-items: center;
        justify-content: center;
        text-align: center;
        background: var(--black);
    }
    
    .scroll-down {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin: 20px auto 40px;
    }

    .primary-btn {
        margin-left: auto;
        margin-right: auto;
    }

    .quote {
        font-size: 1.6rem;
    }

    .gallery h2 {
        font-size: 2.5rem;
    }



    .card {
        padding: 50px 25px;
    }

    .main-left h2 {
        font-size: 2rem;
    }

    footer {
        padding: 40px 25px;
    }
}

/* Contact page mobile fix */
@media (max-width: 600px) {
    main>section:first-child {
        padding: 30px 20px !important;
        text-align: center !important;
    }

    main>section:first-child h1 {
        font-size: 2.2rem !important;
    }

    main>section:first-child p {
        font-size: 0.9rem;
        padding: 0 10px;
    }
}