/* RA' - Ramy Rafaat Designs - Custom Styles */
/* Note: This file complements Tailwind CSS loaded via CDN */

/* ===== CSS Variables ===== */
:root {
    /* Primary Colors */
    --color-black: #0B0B0D;
    --color-black-light: #0A0A0A;
    --color-gold-start: #D4AF37;
    --color-gold-mid: #C5A028;
    --color-gold-end: #E8C547;
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, var(--color-gold-start), var(--color-gold-mid), var(--color-gold-end));
    --gradient-gold-hover: linear-gradient(135deg, var(--color-gold-end), var(--color-gold-mid), var(--color-gold-start));
    
    /* Glass Effect */
    --glass-bg: rgba(11, 11, 13, 0.7);
    --glass-border: rgba(212, 175, 55, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-black);
    color: #fff;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: var(--color-gold-start);
    color: var(--color-black);
}

::-moz-selection {
    background: var(--color-gold-start);
    color: var(--color-black);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-black);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== Typography ===== */
.font-serif {
    font-family: 'Cormorant Garamond', serif;
}

.font-sans {
    font-family: 'Inter', sans-serif;
}

/* Gold Text Gradient */
.text-gold-gradient {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Gold Line Animation ===== */
@keyframes draw-line {
    0% {
        stroke-dashoffset: 1000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.gold-line {
    stroke: url(#gold-gradient);
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.gold-line.animate {
    animation: draw-line 3s ease-out forwards;
}

/* ===== Shimmer Effect ===== */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 175, 55, 0.1),
        transparent
    );
    animation: shimmer 3s infinite;
}

/* ===== Glass Effect ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== Button Styles ===== */
.btn-gold {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-gold);
    color: var(--color-black);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left var(--transition-slow);
}

.btn-gold:hover::before {
    left: 100%;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.btn-outline {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--color-gold-start);
    color: var(--color-gold-start);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all var(--transition-normal);
}

.btn-outline:hover {
    background: var(--gradient-gold);
    color: var(--color-black);
}

/* ===== Card Hover Effects ===== */
.project-card {
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-8px);
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    opacity: 0.7;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0.8;
    transition: all var(--transition-normal);
}

.project-card:hover .card-content {
    transform: translateY(0);
    opacity: 1;
}

/* ===== Image Reveal Animation ===== */
.reveal-image {
    position: relative;
    overflow: hidden;
}

.reveal-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-gold);
    z-index: 2;
    transform: translateX(-101%);
}

.reveal-image.reveal::before {
    animation: reveal 1s ease-out forwards;
}

@keyframes reveal {
    0% {
        transform: translateX(-101%);
    }
    50% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(101%);
    }
}

/* ===== Skill Bar Animation ===== */
.skill-bar {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.skill-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.5s ease-out;
}

.skill-bar-fill.animate {
    transform: scaleX(1);
}

/* ===== Counter Animation ===== */
.counter {
    font-variant-numeric: tabular-nums;
}

/* ===== Lightbox Styles ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

/* ===== Form Styles ===== */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.875rem;
    transition: all var(--transition-normal);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-gold-start);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Loading States ===== */
.skeleton {
    background: linear-gradient(
        90deg,
        #1a1a1a 25%,
        #2a2a2a 50%,
        #1a1a1a 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== Page Transition ===== */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--color-black);
    z-index: 100;
    transform: translateY(-100%);
}

.page-transition.active {
    animation: page-slide 0.6s ease-out forwards;
}

@keyframes page-slide {
    0% {
        transform: translateY(-100%);
    }
    50% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100%);
    }
}

/* ===== Cursor Effects ===== */
.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--color-gold-start);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
}

.cursor-circle {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-gold-start);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease-out;
    opacity: 0.5;
}

.cursor-circle.hover {
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
}

/* ===== Navigation Styles ===== */
.nav-link {
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-normal);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gradient-gold);
    transition: width var(--transition-normal);
}

.nav-link:hover {
    color: white;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-gold-start);
}

.nav-link.active::after {
    width: 100%;
}

/* ===== Gallery Grid ===== */
.gallery-grid {
    display: grid;
    gap: 0.5rem;
}

.gallery-grid.layout-1 {
    grid-template-columns: 1fr;
}

.gallery-grid.layout-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-grid.layout-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-grid.masonry {
    columns: 3;
    column-gap: 0.5rem;
}

.gallery-grid.masonry > * {
    break-inside: avoid;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .gallery-grid.masonry {
        columns: 2;
    }
}

@media (max-width: 480px) {
    .gallery-grid.masonry {
        columns: 1;
    }
}

/* ===== Video Player ===== */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== Admin Panel Styles ===== */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--color-black-light);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.admin-nav-link.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-gold-start);
    border-right: 2px solid var(--color-gold-start);
}

/* ===== Toast Notifications ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-normal);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.5);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.5);
}

/* ===== Responsive Utilities ===== */
@media (max-width: 768px) {
    .btn-gold,
    .btn-outline {
        padding: 0.625rem 1.25rem;
        font-size: 0.75rem;
    }
    
    .form-input {
        padding: 0.75rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .text-gold-gradient {
        -webkit-text-fill-color: black;
        color: black;
    }
}

/* ===== Animations for AOS Override ===== */
[data-aos="fade-up"] {
    transform: translateY(30px);
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
    opacity: 1;
}

[data-aos="zoom-in"] {
    transform: scale(0.95);
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

/* ===== Hover Link Underline Effect ===== */
.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--transition-normal);
}

.hover-underline:hover::after {
    width: 100%;
}

/* ===== Aspect Ratio Utilities ===== */
.aspect-portrait {
    aspect-ratio: 3/4;
}

.aspect-landscape {
    aspect-ratio: 4/3;
}

.aspect-square {
    aspect-ratio: 1/1;
}

.aspect-video {
    aspect-ratio: 16/9;
}

/* ===== Gold Border Animation ===== */
@keyframes border-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    }
}

.border-glow {
    animation: border-glow 3s ease-in-out infinite;
}

/* ===== Text Reveal Animation ===== */
.text-reveal {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.text-reveal.reveal span {
    transform: translateY(0);
}

/* ===== Floating Label Input ===== */
.floating-label {
    position: relative;
}

.floating-label input,
.floating-label textarea {
    padding-top: 1.5rem;
}

.floating-label label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: all var(--transition-fast);
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label textarea:focus + label,
.floating-label textarea:not(:placeholder-shown) + label {
    top: 0.75rem;
    font-size: 0.625rem;
    color: var(--color-gold-start);
    transform: translateY(0);
}

/* ===== Image Zoom on Hover ===== */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.img-zoom:hover img {
    transform: scale(1.1);
}
